From d501a54f4f256d55ae0a3cd5272d5bb8a42daee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=C3=A6r=C3=B8y?= Date: Fri, 21 Oct 2016 01:22:09 +0200 Subject: Emit the TLS handshake finished signal before we do verification. This patch moves the emitted "tls handshake finished" signal to before we do validation of the given TLS certificate. This ensures that we display certificate information before we possibly error out and disconnects from the server. --- src/core/network-openssl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c index e28c8c14..df84772c 100644 --- a/src/core/network-openssl.c +++ b/src/core/network-openssl.c @@ -771,6 +771,9 @@ int irssi_ssl_handshake(GIOChannel *handle) set_peer_cert_chain_info(tls, chan->ssl); set_server_temporary_key_info(tls, chan->ssl); + // Emit the TLS rec. + signal_emit("tls handshake finished", 2, chan->server, tls); + ret = 1; do { @@ -802,9 +805,6 @@ int irssi_ssl_handshake(GIOChannel *handle) } } while (0); - // Emit the TLS rec. - signal_emit("tls handshake finished", 2, chan->server, tls); - done: tls_rec_free(tls); X509_free(cert); -- cgit v1.2.3