From de54384193e6653f7ae88ad38c15979825d6323b Mon Sep 17 00:00:00 2001 From: corvid Date: Tue, 8 Mar 2016 19:08:06 +0000 Subject: openssl 1.0.2f does not like shutdown to be called during handshake thread begins here: http://lists.dillo.org/pipermail/dillo-dev/2016-February/010682.html --- src/IO/tls.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/IO') diff --git a/src/IO/tls.c b/src/IO/tls.c index 3d14deef..8fed45ba 100644 --- a/src/IO/tls.c +++ b/src/IO/tls.c @@ -1041,7 +1041,12 @@ static void Tls_close_by_key(int connkey) a_IOwatch_remove_fd(c->fd, -1); dClose(c->fd); } - SSL_shutdown(c->ssl); + if (!SSL_in_init(c->ssl)) { + /* openssl 1.0.2f does not like shutdown being called during + * handshake, resulting in ssl_undefined_function in the error queue. + */ + SSL_shutdown(c->ssl); + } SSL_free(c->ssl); a_Url_free(c->url); -- cgit v1.2.3