mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 13:20:00 -04:00
TLS: clear 'errno' when handling SSL status
Sometimes tls_do_bio() might be called when there is no new data to process (most notably, when resuming reads), in such a case internal TLS session state will remain untouched and old value in 'errno' will alter the result of SSL_get_error() call, possibly making it to return SSL_ERROR_SYSCALL. This value will be treated as an error, and will lead to closing the connection, which is not what expected.
This commit is contained in:
parent
80f777ccfe
commit
a165b66fc7
1 changed files with 1 additions and 0 deletions
|
|
@ -497,6 +497,7 @@ tls_do_bio(isc_nmsocket_t *sock, isc_region_t *received_data,
|
|||
}
|
||||
}
|
||||
}
|
||||
errno = 0;
|
||||
tls_status = SSL_get_error(sock->tlsstream.tls, rv);
|
||||
saved_errno = errno;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue