rename ticket received
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/library/ssl_client.c b/library/ssl_client.c
index 2111491..0e87d86 100644
--- a/library/ssl_client.c
+++ b/library/ssl_client.c
@@ -757,7 +757,7 @@
session_negotiate->tls_version == MBEDTLS_SSL_VERSION_TLS1_3 &&
session_negotiate->ticket != NULL) {
mbedtls_ms_time_t now = mbedtls_ms_time();
- mbedtls_ms_time_t age = now - session_negotiate->ticket_received;
+ mbedtls_ms_time_t age = now - session_negotiate->ticket_reception_time;
if (age < 0 || age > session_negotiate->ticket_lifetime * 1000) {
/* Without valid ticket, disable session resumption.*/
MBEDTLS_SSL_DEBUG_MSG(
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 42d1b86..2a52047 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -2443,7 +2443,7 @@
*
* struct {
* opaque hostname<0..2^16-1>;
- * uint64 ticket_received;
+ * uint64 ticket_reception_time;
* uint32 ticket_lifetime;
* opaque ticket<1..2^16-1>;
* } ClientOnlyData;
@@ -2492,7 +2492,7 @@
#endif
#if defined(MBEDTLS_HAVE_TIME)
- needed += 8; /* start_time or ticket_received */
+ needed += 8; /* start_time or ticket_reception_time */
#endif
#if defined(MBEDTLS_SSL_CLI_C)
@@ -2555,7 +2555,7 @@
#endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */
#if defined(MBEDTLS_HAVE_TIME)
- MBEDTLS_PUT_UINT64_BE((uint64_t) session->ticket_received, p, 0);
+ MBEDTLS_PUT_UINT64_BE((uint64_t) session->ticket_reception_time, p, 0);
p += 8;
#endif
MBEDTLS_PUT_UINT32_BE(session->ticket_lifetime, p, 0);
@@ -2651,7 +2651,7 @@
if (end - p < 8) {
return MBEDTLS_ERR_SSL_BAD_INPUT_DATA;
}
- session->ticket_received = MBEDTLS_GET_UINT64_BE(p, 0);
+ session->ticket_reception_time = MBEDTLS_GET_UINT64_BE(p, 0);
p += 8;
#endif
if (end - p < 4) {
diff --git a/library/ssl_tls13_client.c b/library/ssl_tls13_client.c
index 294a294..bb688b7 100644
--- a/library/ssl_tls13_client.c
+++ b/library/ssl_tls13_client.c
@@ -938,7 +938,7 @@
* 7 days (enforced in ssl_tls13_parse_new_session_ticket()) . Thus the
* cast to `uint32_t` of the ticket age is safe. */
uint32_t obfuscated_ticket_age =
- (uint32_t) (now - session->ticket_received);
+ (uint32_t) (now - session->ticket_reception_time);
obfuscated_ticket_age += session->ticket_age_add;
ret = ssl_tls13_write_identity(ssl, p, end,
@@ -2829,7 +2829,7 @@
#if defined(MBEDTLS_HAVE_TIME)
/* Store ticket creation time */
- session->ticket_received = mbedtls_ms_time();
+ session->ticket_reception_time = mbedtls_ms_time();
#endif
ciphersuite_info = mbedtls_ssl_ciphersuite_from_id(session->ciphersuite);