mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-04-03 02:56:55 +02:00
dtls: Keep invalid/unexpected record header error code
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@@ -4748,16 +4748,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