mirror of
https://github.com/nmap/nmap.git
synced 2025-12-21 23:19:03 +00:00
Don't rely on -1 return value from SSL_read, just check SSL_get_error() directly
This commit is contained in:
@@ -452,11 +452,11 @@ void handle_connect_result(struct npool *ms, struct nevent *nse, enum nse_status
|
||||
#endif
|
||||
|
||||
sslerr = SSL_get_error(iod->ssl, rc);
|
||||
if (rc == -1 && sslerr == SSL_ERROR_WANT_READ) {
|
||||
if (sslerr == SSL_ERROR_WANT_READ) {
|
||||
nse->sslinfo.ssl_desire = sslerr;
|
||||
socket_count_read_inc(iod);
|
||||
update_events(iod, ms, nse, EV_READ, EV_NONE);
|
||||
} else if (rc == -1 && sslerr == SSL_ERROR_WANT_WRITE) {
|
||||
} else if (sslerr == SSL_ERROR_WANT_WRITE) {
|
||||
nse->sslinfo.ssl_desire = sslerr;
|
||||
socket_count_write_inc(iod);
|
||||
update_events(iod, ms, nse, EV_WRITE, EV_NONE);
|
||||
|
||||
Reference in New Issue
Block a user