diff --git a/library/ssl_ticket.c b/library/ssl_ticket.c index 4d9116d21..ad2d52645 100644 --- a/library/ssl_ticket.c +++ b/library/ssl_ticket.c @@ -101,7 +101,7 @@ static int ssl_ticket_update_keys( mbedtls_ssl_ticket_context *ctx ) uint32_t current_time = (uint32_t) mbedtls_time( NULL ); uint32_t key_time = ctx->keys[ctx->active].generation_time; - if( current_time > key_time && + if( current_time >= key_time && current_time - key_time < ctx->ticket_lifetime ) { return( 0 );