From f4b90cabc0025e14948c03f6ee9e9ccd51c31fb2 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 20 Aug 2013 23:17:23 +0200 Subject: Set SSL_MODE_AUTO_RETRY flag We use OpenSSL (or GnuTLS) with blocking semantics, and we don't want SSL_read(3) or SSL_write(3) calls to return SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE (see #3614716). --- plugins/sslutils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/sslutils.c b/plugins/sslutils.c index 78317f83..818f7996 100644 --- a/plugins/sslutils.c +++ b/plugins/sslutils.c @@ -95,6 +95,7 @@ int np_net_ssl_init_with_hostname_version_and_cert(int sd, char *host_name, int #ifdef SSL_OP_NO_TICKET SSL_CTX_set_options(c, SSL_OP_NO_TICKET); #endif + SSL_CTX_set_mode(c, SSL_MODE_AUTO_RETRY); if ((s = SSL_new(c)) != NULL) { #ifdef SSL_set_tlsext_host_name if (host_name != NULL) -- cgit v1.2.3-74-g34f1