0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 04:02:15 +02:00

OpenSSL : clear the OpenSSL error stack in OpenSSLContext::SSL

destructor.  Not doing so can cause this error:

  OpenSSLContext::SSL::read_cleartext: BIO_read failed, cap=400 status=-1: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init

to wrongly implicate the next SSL session.
This commit is contained in:
James Yonan 2017-02-23 15:07:39 -07:00
parent 24c64593ed
commit 7b15020ae6

View File

@ -570,6 +570,7 @@ namespace openvpn {
BIO_free_all(ssl_bio);
if (ssl)
SSL_free(ssl);
openssl_clear_error_stack();
ssl_clear();
}