[Nagiosplug-devel] Bug in check_tcp.c
Phil Dibowitz
phil at usc.edu
Sun Sep 19 06:37:05 CEST 2004
In check_tcp.c it does:
/* Do the SSL handshake */
if ((ssl = SSL_new (ctx)) != NULL)
{
SSL_set_fd (ssl, sd);
if (SSL_connect(ssl) != -1)
return OK;
ERR_print_errors_fp (stderr);
}
Which doesn't work because anything <1 is a valid error code. In fact, I'm
getting a problem with 0 as an error code. I've changed the code to look like:
/* Do the SSL handshake */
if ((ssl = SSL_new (ctx)) != NULL)
{
SSL_set_fd (ssl, sd);
if (SSL_connect(ssl) == 1)
return OK;
ERR_print_errors_fp (stderr);
}
Additionally, while I'm at it anyone know why I'd be getting an 0 from
SSL_connect, a 1 from SSL_get_errors? I can use openssl s_client -connect to
access the service just fine...
BTW, I'm not subscribed to the list, so please CC me on replies.
--
Phil Dibowitz
Systems Architect and Administrator
Enterprise Infrastructure / ISD / USC
UCC 174 - 213-821-5427
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20040919/c67ad523/attachment.sig>
More information about the Devel
mailing list