diff options
Diffstat (limited to 'lib/ssl/src/tls_server_session_ticket.erl')
-rw-r--r-- | lib/ssl/src/tls_server_session_ticket.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ssl/src/tls_server_session_ticket.erl b/lib/ssl/src/tls_server_session_ticket.erl index b625cbcd52..f6b91404fb 100644 --- a/lib/ssl/src/tls_server_session_ticket.erl +++ b/lib/ssl/src/tls_server_session_ticket.erl @@ -181,7 +181,7 @@ inital_state([stateful, Lifetime, TicketStoreSize, MaxEarlyDataSize|_]) -> }. ticket_age_add() -> - MaxTicketAge = 7 * 24 * 3600, + MaxTicketAge = 7 * 24 * 3600 * 1000, IntMax = round(math:pow(2,32)) - 1, MaxAgeAdd = IntMax - MaxTicketAge, <<?UINT32(I)>> = crypto:strong_rand_bytes(4), @@ -385,10 +385,10 @@ stateless_living_ticket(0, _, _, _, _) -> stateless_living_ticket(ObfAge, TicketAgeAdd, Lifetime, Timestamp, Window) -> ReportedAge = ObfAge - TicketAgeAdd, RealAge = erlang:system_time(second) - Timestamp, - (ReportedAge =< Lifetime) + (ReportedAge =< Lifetime * 1000) andalso (RealAge =< Lifetime) andalso (in_window(RealAge, Window)). - + in_window(_, undefined) -> true; in_window(Age, Window) when is_integer(Window) -> |