commit | aa71500173ada7bb0c2d7f533d461f29a752932a | [log] [tgz] |
---|---|---|
author | Hanno Becker <hanno.becker@arm.com> | Tue Aug 21 13:55:31 2018 +0100 |
committer | Hanno Becker <hanno.becker@arm.com> | Tue Aug 21 17:48:52 2018 +0100 |
tree | 3ffc6e92e43df83711238bd081106d7d65311030 | |
parent | 1d7399351e8e3685c5811d0008f9e80d0aac7ad7 [diff] [blame] |
Fix bug in SSL ticket implementation removing keys of age < 1s Fixes #1968.
diff --git a/library/ssl_ticket.c b/library/ssl_ticket.c index a2b3048..985b7cd 100644 --- a/library/ssl_ticket.c +++ b/library/ssl_ticket.c
@@ -97,7 +97,7 @@ 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 );