1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

* Backed out code where close notify from other side closed the socket and ssl session. This needs to be done by the application.

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@261 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
cameronrich
2016-07-19 20:44:20 +00:00
committed by Yasuki Ikeuchi
parent 549bcb478e
commit 01a0531bc3

View File

@ -226,7 +226,9 @@ EXP_FUNC void STDCALL ssl_free(SSL *ssl)
/* may already be free - but be sure */ /* may already be free - but be sure */
free(ssl->encrypt_ctx); free(ssl->encrypt_ctx);
ssl->encrypt_ctx = NULL;
free(ssl->decrypt_ctx); free(ssl->decrypt_ctx);
ssl->decrypt_ctx = NULL;
disposable_free(ssl); disposable_free(ssl);
certificate_free(ssl); certificate_free(ssl);
free(ssl->bm_all_data); free(ssl->bm_all_data);
@ -1345,8 +1347,8 @@ int basic_read(SSL *ssl, uint8_t **in_data)
buf[1] == SSL_ALERT_CLOSE_NOTIFY) buf[1] == SSL_ALERT_CLOSE_NOTIFY)
{ {
ret = SSL_CLOSE_NOTIFY; ret = SSL_CLOSE_NOTIFY;
ssl_free(ssl); send_alert(ssl, SSL_ALERT_CLOSE_NOTIFY);
SOCKET_CLOSE(ssl->client_fd); SET_SSL_FLAG(SSL_SENT_CLOSE_NOTIFY);
} }
else else
{ {