[nagiosplug] check_http: Don't ignore SSL initialization errors
"Nagios Plugin Development" <[email protected]> Mon, 28 May 2012 22:10:13 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug Branch: master Commit: ec2596b92d013a320e171f81912149915ef7ea40 Author: Holger Weiss <[email protected]> Date: Mon May 28 21:42:48 2012 +0200 URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=ec2596b check_http: Don't ignore SSL initialization errors SSL initialization errors are now handled properly by check_http (#3095106 - Eric Schoeller). --- plugins/check_http.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/plugins/check_http.c b/plugins/check_http.c index ea7ddec..8712079 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -806,7 +806,9 @@ check_http (void) die (STATE_CRITICAL, _("HTTP CRITICAL - Unable to open TCP socket\n")); #ifdef HAVE_SSL if (use_ssl == TRUE) { - np_net_ssl_init_with_hostname_and_version(sd, (use_sni ? host_name : NULL), ssl_version); + result = np_net_ssl_init_with_hostname_and_version(sd, (use_sni ? host_name : NULL), ssl_version); + if (result != STATE_OK) + return result; if (check_cert == TRUE) { result = np_net_ssl_check_cert(days_till_exp); np_net_ssl_cleanup(); ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/