fix various issues

- fix CI failure due to wrong usage of ticket_lifetime
- Improve document and comments

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu 2023-11-14 11:06:52 +08:00
parent 342a555eef
commit cf9135100e
7 changed files with 20 additions and 27 deletions

View file

@ -4099,7 +4099,7 @@
/**
* \def MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE
*
* Maximum allowd ticket age difference in milliseconds tolerated between
* Maximum allowed ticket age difference in milliseconds tolerated between
* server and client. Default value is 6000. This is not used in TLS 1.2.
*
* - The client ticket age is the time difference between the time when the
@ -4109,11 +4109,11 @@
* server receives a proposition from the client to use the ticket and the
* time when the ticket was created by the server.
*
* The ages might be different due to accuracy of RTC crypstal. The typical
* accuracy of an RTC crystal is ±100 to ±20 parts per million (360 to 72
* milliseconds per hour). Default tolerance windows is 6s, thus in the worst
* case client and servers must sync up their system time every 6000/360/2~=8
* hours.
* The ages might be different due to the client and server clocks not running
* at the same pace. The typical accuracy of an RTC crystal is ±100 to ±20 parts
* per million (360 to 72 milliseconds per hour). Default tolerance window is
* 6s, thus in the worst case clients and servers must sync up their system time
* every 6000/360/2~=8 hours.
*
*/
//#define MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE 6000

View file

@ -1256,10 +1256,10 @@ struct mbedtls_ssl_session {
#if defined(MBEDTLS_HAVE_TIME)
#if defined(MBEDTLS_SSL_CLI_C)
mbedtls_ms_time_t MBEDTLS_PRIVATE(ticket_reception_time); /*!< time that ticket was received */
mbedtls_ms_time_t MBEDTLS_PRIVATE(ticket_reception_time); /*!< time when ticket was received. */
#endif
#if defined(MBEDTLS_SSL_SRV_C)
mbedtls_ms_time_t MBEDTLS_PRIVATE(ticket_creation_time); /*!< create time of ticket */
mbedtls_ms_time_t MBEDTLS_PRIVATE(ticket_creation_time); /*!< time when ticket was created. */
#endif
#endif /* MBEDTLS_HAVE_TIME */