diff --git a/src/internal.c b/src/internal.c index 94252a2166..45862ec96c 100644 --- a/src/internal.c +++ b/src/internal.c @@ -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