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:
parent
472a69260b
commit
8e0174ac05
3 changed files with 7 additions and 4 deletions
library
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue