mirror of https://github.com/wolfSSL/wolfssl.git
Merge pull request #11379 from Frauschi/0rtt-fresh-start-clock-skew
TLS 1.3: compare the 0-RTT fresh start reference against a whole secondpull/8069/merge
commit
19b6eecb87
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue