From d4c5730464ea7f9e701ebd5e57f1ac021d7500c6 Mon Sep 17 00:00:00 2001 From: awiddersheim Date: Thu, 26 Sep 2013 10:27:06 -0400 Subject: Die on SSL initialization errors Fixes issue where if an SSL initialization error occurs on a redirect using -f follow the plugin still returns an OK state. Closes #1159. --- plugins/check_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/check_http.c b/plugins/check_http.c index ecd832f8..c36d916a 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -881,7 +881,7 @@ check_http (void) gettimeofday (&tv_temp, NULL); result = np_net_ssl_init_with_hostname_version_and_cert(sd, (use_sni ? host_name : NULL), ssl_version, client_cert, client_privkey); if (result != STATE_OK) - return result; + die (STATE_CRITICAL, NULL); microsec_ssl = deltime (tv_temp); elapsed_time_ssl = (double)microsec_ssl / 1.0e6; if (check_cert == TRUE) { -- cgit v1.2.3-74-g34f1