mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-27 11:54:44 +08:00
Fixed tls_read and tls_write to prevent a subsequent crash in SSL_shutdown when read/write errors occur.
This commit is contained in:
parent
c4f6dcc24f
commit
2a49238351
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user