From 7bb40a36503f5a649141d3a69b1371c63e804e4b Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Mon, 4 Dec 2023 10:04:15 +0800 Subject: [PATCH] send unexpected alert when not received eoed or app during reading early data Signed-off-by: Jerry Yu --- library/ssl_tls13_server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/ssl_tls13_server.c b/library/ssl_tls13_server.c index 65688cffc..1c359a268 100644 --- a/library/ssl_tls13_server.c +++ b/library/ssl_tls13_server.c @@ -2897,6 +2897,8 @@ static int ssl_tls13_end_of_early_data_coordinate(mbedtls_ssl_context *ssl) MBEDTLS_SSL_DEBUG_MSG(1, ("got unexpected message.")); + MBEDTLS_SSL_PEND_FATAL_ALERT(MBEDTLS_SSL_ALERT_MSG_UNEXPECTED_MESSAGE, + MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE); return MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE; }