Send decode error alert when EOED parsing fail
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
3be850782c
commit
fbf039932a
1 changed files with 6 additions and 1 deletions
|
@ -2910,7 +2910,12 @@ static int ssl_tls13_parse_end_of_early_data(mbedtls_ssl_context *ssl,
|
||||||
* struct {} EndOfEarlyData;
|
* struct {} EndOfEarlyData;
|
||||||
*/
|
*/
|
||||||
((void) ssl);
|
((void) ssl);
|
||||||
return buf == end ? 0 : MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE;
|
if (buf != end) {
|
||||||
|
MBEDTLS_SSL_PEND_FATAL_ALERT(MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR,
|
||||||
|
MBEDTLS_ERR_SSL_DECODE_ERROR);
|
||||||
|
return MBEDTLS_ERR_SSL_DECODE_ERROR;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
MBEDTLS_CHECK_RETURN_CRITICAL
|
MBEDTLS_CHECK_RETURN_CRITICAL
|
||||||
|
|
Loading…
Reference in a new issue