diff options
author | vagrant <vagrant@debiantesting-64> | 2016-11-13 19:39:46 +0000 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2016-11-13 21:14:02 +0000 |
commit | fe1c4bb0e5ea3632d608a6b8b7e51d580856d833 (patch) | |
tree | 5fceabfc6f53b2bf7505bba099fa75d6cc8159bc /plugins/check_http.c | |
parent | 2f845e9ebc2b7bcf6472e0191752215d351e4e7c (diff) | |
download | monitoring-plugins-fe1c4bb0e5ea3632d608a6b8b7e51d580856d833.tar.gz |
add openssl 1.1 support
changes:
- CRYPTO_lock detection replaced in configure.ac. We don't use that
function anywhere, so just replace it with the suggested one from
https://wiki.openssl.org/index.php/Library_Initialization#Autoconf
- OPENSSL_NO_SSL2 is no longer defined while ssl2 is not included.
Set it ourself using the suggested openssl 1.1 version check from
https://wiki.openssl.org/index.php/1.1_API_Changes#Backward_compatibility
- openssl 1.1 sends a sigpipe if the connection is still open when
calling SSL_shutdown(), so move the close before the shutdown.
Signed-off-by: Sven Nierlein <sven@nierlein.de>
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r-- | plugins/check_http.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index 60fe4d52..2347a6f2 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -941,8 +941,8 @@ check_http (void) elapsed_time_ssl = (double)microsec_ssl / 1.0e6; if (check_cert == TRUE) { result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit); - np_net_ssl_cleanup(); if (sd) close(sd); + np_net_ssl_cleanup(); return result; } } @@ -1086,10 +1086,10 @@ check_http (void) die (STATE_CRITICAL, _("HTTP CRITICAL - No data received from host\n")); /* close the connection */ + if (sd) close(sd); #ifdef HAVE_SSL np_net_ssl_cleanup(); #endif - if (sd) close(sd); /* Save check time */ microsec = deltime (tv); |