Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2670,15 +2670,13 @@ int InitSSL_Ctx(WOLFSSL_CTX* ctx, WOLFSSL_METHOD* method, void* heap)
}
else {
ctx->ticketStartTime -= ctx->ticketStartTime % 1000;
#ifdef WOLFSSL_32BIT_MILLI_TIME
/* A 32 bit ms clock is truncated mod 2^32, which is not a multiple
* of 1000, so the modulo above does not remove the true sub-second
* part. Drop a whole further second so a ticket minted in the same
* second as this ctx is never flagged as predating it. */
/* Drop a further second so a ticket minted in the same second as the
* ctx is never flagged as predating it: ticketSeen is read from
* LowResTimer() rather than this clock, and a wrapped 32 bit ms clock
* keeps its true sub-second part through the modulo above. */
if (ctx->ticketStartTime > 1000) {
ctx->ticketStartTime -= 1000;
}
#endif
}
#endif

Expand Down
Loading