Fixed tls_read and tls_write to prevent a subsequent crash in SSL_shutdown when read/write errors occur.

This commit is contained in:
Mike McDonald 2014-01-17 10:24:13 -05:00
parent c4f6dcc24f
commit 2a49238351

View File

@ -423,6 +423,13 @@ int tls_read(rdpTls* tls, BYTE* data, int length)
}
}
/* No need to send "close notify" shutdown alert to peer. In
fact, some circumstances will cause SSL_shutdown to crash. */
if (status == -1)
{
SSL_set_shutdown(tls->ssl, SSL_SENT_SHUTDOWN);
}
return status;
}
@ -474,6 +481,13 @@ int tls_write(rdpTls* tls, BYTE* data, int length)
}
}
/* No need to send "close notify" shutdown alert to peer. In
fact, some circumstances will cause SSL_shutdown to crash. */
if (status == -1)
{
SSL_set_shutdown(tls->ssl, SSL_SENT_SHUTDOWN);
}
return status;
}