From fbbc6aeb008a2d8ca76cb7ed3d1497fd56f831ea Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Sun, 24 Apr 2016 10:39:16 +0100 Subject: [PATCH] ssld: send cipher/certfp before proxying any plaintext traffic --- ssld/ssld.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ssld/ssld.c b/ssld/ssld.c index 68f0cda3..cb74d2de 100644 --- a/ssld/ssld.c +++ b/ssld/ssld.c @@ -706,10 +706,10 @@ ssl_process_accept_cb(rb_fde_t *F, int status, struct sockaddr *addr, rb_socklen if(status == RB_OK) { - conn_mod_read_cb(conn->mod_fd, conn); - conn_plain_read_cb(conn->plain_fd, conn); ssl_send_cipher(conn); ssl_send_certfp(conn); + conn_mod_read_cb(conn->mod_fd, conn); + conn_plain_read_cb(conn->plain_fd, conn); return; } /* ircd doesn't care about the reason for this */ @@ -724,10 +724,10 @@ ssl_process_connect_cb(rb_fde_t *F, int status, void *data) if(status == RB_OK) { - conn_mod_read_cb(conn->mod_fd, conn); - conn_plain_read_cb(conn->plain_fd, conn); ssl_send_cipher(conn); ssl_send_certfp(conn); + conn_mod_read_cb(conn->mod_fd, conn); + conn_plain_read_cb(conn->plain_fd, conn); } else if(status == RB_ERR_TIMEOUT) close_conn(conn, WAIT_PLAIN, "SSL handshake timed out");