[Nagiosplug-checkins] CVS: nagiosplug/plugins check_http.c,1.18,1.19
Ton Voon
tonvoon at users.sourceforge.net
Tue Jan 28 21:56:04 CET 2003
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv19178
Modified Files:
check_http.c
Log Message:
Better error if server requests client based certificate (609382 - Olaf Greis)
Index: check_http.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_http.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** check_http.c 28 Jan 2003 07:15:54 -0000 1.18
--- check_http.c 29 Jan 2003 05:55:50 -0000 1.19
***************
*** 542,545 ****
--- 542,548 ----
char *orig_url = NULL;
double elapsed_time;
+ #ifdef HAVE_SSL
+ int sslerr;
+ #endif
/* try to connect to the host at the given port number */
***************
*** 675,680 ****
}
! if (i < 0)
terminate (STATE_CRITICAL, "Error in recv()");
/* return a CRITICAL status if we couldn't read any data */
--- 678,693 ----
}
! 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 */
More information about the Commits
mailing list