summaryrefslogtreecommitdiffstats
path: root/plugins/sslutils.c
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-08-20 23:17:23 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-08-20 23:17:23 +0200
commitf4b90cabc0025e14948c03f6ee9e9ccd51c31fb2 (patch)
tree30ed6d8cd3926dc4cdfec0f7bd752a112c9a759f /plugins/sslutils.c
parent7a80e27fb38b26713ac5a1f6810b99519a31dbf3 (diff)
downloadmonitoring-plugins-f4b90cabc0025e14948c03f6ee9e9ccd51c31fb2.tar.gz
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).
Diffstat (limited to 'plugins/sslutils.c')
-rw-r--r--plugins/sslutils.c1
1 files changed, 1 insertions, 0 deletions
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
95#ifdef SSL_OP_NO_TICKET 95#ifdef SSL_OP_NO_TICKET
96 SSL_CTX_set_options(c, SSL_OP_NO_TICKET); 96 SSL_CTX_set_options(c, SSL_OP_NO_TICKET);
97#endif 97#endif
98 SSL_CTX_set_mode(c, SSL_MODE_AUTO_RETRY);
98 if ((s = SSL_new(c)) != NULL) { 99 if ((s = SSL_new(c)) != NULL) {
99#ifdef SSL_set_tlsext_host_name 100#ifdef SSL_set_tlsext_host_name
100 if (host_name != NULL) 101 if (host_name != NULL)