mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
* PT_APP_PROTOCOL_DATA has a test for hs_status=SSL_OK to prevent possible exchanges before the handshake is complete.
* Changed license on sha256.c to full BSD. git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@244 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
@ -1348,13 +1348,14 @@ int basic_read(SSL *ssl, uint8_t **in_data)
|
||||
break;
|
||||
|
||||
case PT_APP_PROTOCOL_DATA:
|
||||
if (in_data)
|
||||
if (in_data && ssl->hs_status == SSL_OK)
|
||||
{
|
||||
*in_data = buf; /* point to the work buffer */
|
||||
(*in_data)[read_len] = 0; /* null terminate just in case */
|
||||
ret = read_len;
|
||||
}
|
||||
|
||||
ret = read_len;
|
||||
else
|
||||
ret = SSL_ERROR_INVALID_PROT_MSG;
|
||||
break;
|
||||
|
||||
case PT_ALERT_PROTOCOL:
|
||||
|
Reference in New Issue
Block a user