--- 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)