mirror of
https://github.com/espressif/mbedtls.git
synced 2026-10-02 07:07:22 +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)
|
&& (ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE)
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
/*
|
return ret;
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_SSL_SRV_C */
|
#endif /* MBEDTLS_SSL_SRV_C */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user