1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-05-12 09:54:38 +08:00

implement parser of eoed

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu 2023-12-01 16:41:40 +08:00
parent b4ed4602f2
commit 75c9ab76b5

View File

@ -2914,11 +2914,12 @@ static int ssl_tls13_parse_end_of_early_data(mbedtls_ssl_context *ssl,
const unsigned char *buf,
const unsigned char *end)
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
/* RFC 8446 section 4.5
*
* struct {} EndOfEarlyData;
*/
((void) ssl);
((void) buf);
((void) end);
return ret;
return buf == end ? 0 : MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE;
}
MBEDTLS_CHECK_RETURN_CRITICAL