summaryrefslogtreecommitdiff
path: root/src/IO/tls.c
diff options
context:
space:
mode:
authorcorvid <devnull@localhost>2016-03-08 19:08:06 +0000
committercorvid <devnull@localhost>2016-03-08 19:08:06 +0000
commitde54384193e6653f7ae88ad38c15979825d6323b (patch)
treea236ec6eeb2f274206b6385b5749d55626eb8596 /src/IO/tls.c
parent0cad0bdfb9b44d181b9e087f7cf84e264a34936a (diff)
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
Diffstat (limited to 'src/IO/tls.c')
-rw-r--r--src/IO/tls.c7
1 files changed, 6 insertions, 1 deletions
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);