mirror of
https://github.com/espressif/mbedtls.git
synced 2025-06-26 11:36:07 +08:00
Fix the ticket_lifetime equal to 0 issue
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
This commit is contained in:
parent
126bf8e4d7
commit
28af501cae
@ -2848,7 +2848,8 @@ static int ssl_tls13_write_new_session_ticket_body( mbedtls_ssl_context *ssl,
|
|||||||
* MAY treat a ticket as valid for a shorter period of time than what
|
* MAY treat a ticket as valid for a shorter period of time than what
|
||||||
* is stated in the ticket_lifetime.
|
* is stated in the ticket_lifetime.
|
||||||
*/
|
*/
|
||||||
ticket_lifetime %= 604800;
|
if( ticket_lifetime > 604800 )
|
||||||
|
ticket_lifetime = 604800;
|
||||||
MBEDTLS_PUT_UINT32_BE( ticket_lifetime, p, 0 );
|
MBEDTLS_PUT_UINT32_BE( ticket_lifetime, p, 0 );
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "ticket_lifetime: %u",
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "ticket_lifetime: %u",
|
||||||
( unsigned int )ticket_lifetime ) );
|
( unsigned int )ticket_lifetime ) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user