mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Define ticket creation time in TLS 1.2 case as well
The purpose of this change is to eventually base the calculation in ssl_ticket.c of the ticket age when parsing a ticket on the ticket creation time both in TLS 1.2 and TLS 1.3 case. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@@ -1228,6 +1228,12 @@ struct mbedtls_ssl_session {
|
||||
uint32_t MBEDTLS_PRIVATE(ticket_lifetime); /*!< ticket lifetime hint */
|
||||
#endif /* MBEDTLS_SSL_SESSION_TICKETS && MBEDTLS_SSL_CLI_C */
|
||||
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_SRV_C) && \
|
||||
defined(MBEDTLS_HAVE_TIME)
|
||||
/*! Time in milliseconds when the ticket was created. */
|
||||
mbedtls_ms_time_t MBEDTLS_PRIVATE(ticket_creation_time);
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_3) && defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||
uint8_t MBEDTLS_PRIVATE(ticket_flags); /*!< Ticket flags */
|
||||
uint32_t MBEDTLS_PRIVATE(ticket_age_add); /*!< Randomly generated value used to obscure the age of the ticket */
|
||||
@@ -1238,15 +1244,10 @@ struct mbedtls_ssl_session {
|
||||
char *MBEDTLS_PRIVATE(hostname); /*!< host name binded with tickets */
|
||||
#endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION && MBEDTLS_SSL_CLI_C */
|
||||
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
#if defined(MBEDTLS_SSL_CLI_C)
|
||||
mbedtls_ms_time_t MBEDTLS_PRIVATE(ticket_reception_time); /*!< time when ticket was received. */
|
||||
#if defined(MBEDTLS_HAVE_TIME) && defined(MBEDTLS_SSL_CLI_C)
|
||||
/*! Time in milliseconds when the last ticket was received. */
|
||||
mbedtls_ms_time_t MBEDTLS_PRIVATE(ticket_reception_time);
|
||||
#endif
|
||||
#if defined(MBEDTLS_SSL_SRV_C)
|
||||
mbedtls_ms_time_t MBEDTLS_PRIVATE(ticket_creation_time); /*!< time when ticket was created. */
|
||||
#endif
|
||||
#endif /* MBEDTLS_HAVE_TIME */
|
||||
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_3 && MBEDTLS_SSL_SESSION_TICKETS */
|
||||
|
||||
#if defined(MBEDTLS_SSL_EARLY_DATA)
|
||||
|
Reference in New Issue
Block a user