]> jfr.im git - solanum.git/commit - ircd/listener.c
authd: wait until the ssl connection is "open" before reading
authorSimon Arlott <sa.me.uk>
Mon, 25 Apr 2016 20:35:58 +0000 (21:35 +0100)
committerSimon Arlott <sa.me.uk>
Mon, 25 Apr 2016 20:43:21 +0000 (21:43 +0100)
commit762468f85d2f99c3b51ffc9800ae55b945c798e6
tree1f9fe760d3cc9365f2ff6bae1d33d36e5816df53
parent53789fddda974222f729d608558ce9ae662c6d9f
authd: wait until the ssl connection is "open" before reading

It's useful to allow authd to run in parallel with ssl negotiation,
but if the ssld connection has plaintext data ready for reading
there's a race condition between authd calling read_packet() and
ssl_process_certfp() storing the certificate fingerprint. This
scenario would be bad for a server connecting because fingerprint
verification will fail.

Allow either operation to complete first, but wait until
ssl_process_open_fd() calls the ssl open callback before calling
read_packet().
include/authproc.h
include/client.h
ircd/authproc.c
ircd/listener.c