mirror of
https://github.com/espressif/mbedtls.git
synced 2026-08-16 16:37:47 +00:00
dtls: Keep invalid/unexpected record header error code
Signed-off-by: Ronald Cron <[email protected]>
This commit is contained in:
+1
-10
@@ -5040,16 +5040,7 @@ static int ssl_get_next_record(mbedtls_ssl_context *ssl)
|
||||
&& (ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE)
|
||||
#endif
|
||||
) {
|
||||
/*
|
||||
* For backward compatibility, return
|
||||
* MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE rather than
|
||||
* MBEDTLS_ERR_SSL_UNEXPECTED_RECORD.
|
||||
*/
|
||||
if (ret == MBEDTLS_ERR_SSL_UNEXPECTED_RECORD) {
|
||||
return MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE;
|
||||
} else {
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_SRV_C */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user