mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-07 06:42:56 +03:00
Add maximum ticket lifetime check
Also add comments for age cast Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
@@ -2748,7 +2748,8 @@ static int ssl_tls13_parse_new_session_ticket(mbedtls_ssl_context *ssl,
|
||||
MBEDTLS_SSL_DEBUG_MSG(3,
|
||||
("ticket_lifetime: %u",
|
||||
(unsigned int) session->ticket_lifetime));
|
||||
if (session->ticket_lifetime > 604800) {
|
||||
if (session->ticket_lifetime >
|
||||
MBEDTLS_SSL_TLS1_3_MAX_ALLOWED_TICKET_LIFETIME) {
|
||||
MBEDTLS_SSL_DEBUG_MSG(3, ("ticket_lifetime exceeds 7 days."));
|
||||
return MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER;
|
||||
}
|
||||
|
Reference in New Issue
Block a user