Skip to content

Commit

Permalink
Fix bug in SSL ticket implementation removing keys of age < 1s
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanno Becker committed Aug 21, 2018
1 parent 1d73993 commit aa71500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/ssl_ticket.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,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 );
Expand Down

0 comments on commit aa71500

Please sign in to comment.