[Nagiosplug-devel] [ nagiosplug-Bugs-3614716 ] np_net_ssl_read fails to take SSL_WANT_READ into account

SourceForge.net noreply at sourceforge.net
Tue Jul 16 22:24:37 CEST 2013


Bugs item #3614716, was opened at 2013-07-16 07:17
Message generated for change (Settings changed) made by hweiss
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3614716&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Pepijn Schmitz (pepijn)
>Assigned to: Holger Weiss (hweiss)
Summary: np_net_ssl_read fails to take SSL_WANT_READ into account 

Initial Comment:
The np_net_ssl_read function in sslutils.c fails to take the SSL_ERROR_WANT_READ return code into account. This is not an error but indicates that the read should be retried. It can occur for instance when an SSL/TLS renegotiation occurs. This is causing the following check_http command to fail with a "HTTP CRITICAL - Error on receive" message, causing a false negative (the site in question works fine):

check_http -I www.essentialmall.com -S

The fix is to replace the np_net_ssl_read() function with this:

int np_net_ssl_read(void *buf, int num) {
        int rc;
        do {
                rc = SSL_read(s, buf, num);
        } while ((rc < 0) && (SSL_get_error(s, rc) == SSL_ERROR_WANT_READ));
        return rc;
}

----------------------------------------------------------------------

Comment By: Jan Wagner (cyco_dd)
Date: 2013-07-16 09:40

Message:
easiest way to get patches integrated is to send push requests to
https://github.com/nagios-plugins/nagios-plugins

----------------------------------------------------------------------

Comment By: Pepijn Schmitz (pepijn)
Date: 2013-07-16 07:19

Message:
This is in release 1.4.16.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3614716&group_id=29880




More information about the Devel mailing list