mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Chage to use WOLFSSL_SESSION.bornON instead of WOLFSSL_SESSION.timestamp to hold the ticket creation time.
This commit is contained in:
@ -28071,17 +28071,13 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||||||
ssl->options.resuming = 0;
|
ssl->options.resuming = 0;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#if defined(HAVE_SESSION_TICKET) || !defined(NO_PSK)
|
#if defined(HAVE_SESSION_TICKET) && !defined(WOLFSSL_NO_TICKET_EXPIRE)
|
||||||
#ifdef WOLFSSL_TLS13
|
|
||||||
word32 born;
|
|
||||||
/* check if the ticket is valid */
|
/* check if the ticket is valid */
|
||||||
ato32((const byte*)&(session->ticketSeen), &born);
|
if (LowResTimer() > session->bornOn + ssl->timeout) {
|
||||||
if (LowResTimer() > born + ssl->timeout) {
|
|
||||||
WOLFSSL_MSG("Expired session ticket, fall back to full handshake.");
|
WOLFSSL_MSG("Expired session ticket, fall back to full handshake.");
|
||||||
ssl->options.resuming = 0;
|
ssl->options.resuming = 0;
|
||||||
}
|
}
|
||||||
#endif /* WOLFSSL_TLS13 */
|
#endif /* HAVE_SESSION_TICKET || !WOLFSSL_NO_TICKET_EXPIRE */
|
||||||
#endif /* HAVE_SESSION_TICKET || !NO_PSK */
|
|
||||||
|
|
||||||
else if (session->haveEMS != ssl->options.haveEMS) {
|
else if (session->haveEMS != ssl->options.haveEMS) {
|
||||||
/* RFC 7627, 5.3, server-side */
|
/* RFC 7627, 5.3, server-side */
|
||||||
@ -29497,9 +29493,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
|||||||
/* Copy the haveExtendedMasterSecret property from the ticket to
|
/* Copy the haveExtendedMasterSecret property from the ticket to
|
||||||
* the saved session, so the property may be checked later. */
|
* the saved session, so the property may be checked later. */
|
||||||
ssl->session.haveEMS = it.haveEMS;
|
ssl->session.haveEMS = it.haveEMS;
|
||||||
#ifdef WOLFSSL_TLS13
|
ato32((const byte*)&it.timestamp, &ssl->session.bornOn);
|
||||||
ssl->session.ticketSeen = it.timestamp;
|
|
||||||
#endif
|
|
||||||
#ifndef NO_RESUME_SUITE_CHECK
|
#ifndef NO_RESUME_SUITE_CHECK
|
||||||
ssl->session.cipherSuite0 = it.suite[0];
|
ssl->session.cipherSuite0 = it.suite[0];
|
||||||
ssl->session.cipherSuite = it.suite[1];
|
ssl->session.cipherSuite = it.suite[1];
|
||||||
|
Reference in New Issue
Block a user