From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/31133-check_http.diff | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 web/attachments/31133-check_http.diff (limited to 'web/attachments/31133-check_http.diff') diff --git a/web/attachments/31133-check_http.diff b/web/attachments/31133-check_http.diff new file mode 100644 index 0000000..1e80479 --- /dev/null +++ b/web/attachments/31133-check_http.diff @@ -0,0 +1,32 @@ +--- check_http.c Thu Feb 28 07:42:57 2002 ++++ /root/check_http.c Sat Sep 14 22:51:21 2002 +@@ -529,6 +529,9 @@ + size_t pagesize = 0; + char *full_page = NULL; + char *pos = NULL; ++#ifdef HAVE_SSL ++ int sslerr; ++#endif + + /* try to connect to the host at the given port number */ + #ifdef HAVE_SSL +@@ -660,8 +663,18 @@ + pagesize += i; + } + +- if (i < 0) ++ if (i < 0) { ++#ifdef HAVE_SSL ++ sslerr=SSL_get_error(ssl, i); ++ if ( sslerr == SSL_ERROR_SSL ) { ++ terminate (STATE_WARNING, "Client Certificate Required\n"); ++ } else { ++ terminate (STATE_CRITICAL, "Error in recv()"); ++ } ++#else + terminate (STATE_CRITICAL, "Error in recv()"); ++#endif ++ } + + /* return a CRITICAL status if we couldn't read any data */ + if (pagesize == (size_t) 0) -- cgit v1.2.3-74-g34f1