Ensure to clear the SSL error queue before calling SSL_{read,write,do_handshake}

fixes #12100
This commit is contained in:
Michael Friedrich 2016-07-05 15:25:02 +02:00
parent 63f83e8bec
commit 9b873d60c2
1 changed files with 5 additions and 0 deletions

View File

@ -149,6 +149,11 @@ void TlsStream::OnEvent(int revents)
bool success = false;
/* Clear error queue for this thread before using SSL_{read,write,do_handshake}.
* Otherwise SSL_*_error() does not work reliably.
*/
ERR_clear_error();
switch (m_CurrentAction) {
case TlsActionRead:
do {