tls13: srv: Move early data size check placeholder
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com> Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
739a1d4246
commit
6a5904db45
1 changed files with 7 additions and 8 deletions
|
@ -2911,6 +2911,13 @@ static int ssl_tls13_end_of_early_data_coordinate(mbedtls_ssl_context *ssl)
|
||||||
|
|
||||||
if (ssl->in_msgtype == MBEDTLS_SSL_MSG_APPLICATION_DATA) {
|
if (ssl->in_msgtype == MBEDTLS_SSL_MSG_APPLICATION_DATA) {
|
||||||
MBEDTLS_SSL_DEBUG_MSG(3, ("Received early data"));
|
MBEDTLS_SSL_DEBUG_MSG(3, ("Received early data"));
|
||||||
|
/* RFC 8446 section 4.6.1
|
||||||
|
*
|
||||||
|
* A server receiving more than max_early_data_size bytes of 0-RTT data
|
||||||
|
* SHOULD terminate the connection with an "unexpected_message" alert.
|
||||||
|
*
|
||||||
|
* TODO: Add received data size check here.
|
||||||
|
*/
|
||||||
return SSL_GOT_EARLY_DATA;
|
return SSL_GOT_EARLY_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2956,14 +2963,6 @@ static int ssl_tls13_process_early_application_data(mbedtls_ssl_context *ssl)
|
||||||
ssl->in_msg[ssl->in_msglen] = 0;
|
ssl->in_msg[ssl->in_msglen] = 0;
|
||||||
MBEDTLS_SSL_DEBUG_MSG(3, ("\n%s", ssl->in_msg));
|
MBEDTLS_SSL_DEBUG_MSG(3, ("\n%s", ssl->in_msg));
|
||||||
|
|
||||||
/* RFC 8446 section 4.6.1
|
|
||||||
*
|
|
||||||
* A server receiving more than max_early_data_size bytes of 0-RTT data
|
|
||||||
* SHOULD terminate the connection with an "unexpected_message" alert.
|
|
||||||
*
|
|
||||||
* TODO: Add received data size check here.
|
|
||||||
*/
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue