1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-10-23 01:52:40 +03:00

Backport time_t type conversions

Signed-off-by: Ben Taylor <ben.taylor@linaro.org>
This commit is contained in:
Ben Taylor
2025-09-29 15:35:28 +01:00
parent 02b7707b10
commit 6e73b2f2fd
3 changed files with 5 additions and 2 deletions

View File

@@ -0,0 +1,4 @@
Bugfix
* Fix a build error or incorrect TLS session
lifetime on platforms where mbedtls_time_t
is not time_t. Fixes #10236.

View File

@@ -3627,7 +3627,7 @@ static int ssl_tls12_session_load(mbedtls_ssl_session *session,
start = MBEDTLS_GET_UINT64_BE(p, 0); start = MBEDTLS_GET_UINT64_BE(p, 0);
p += 8; p += 8;
session->start = (time_t) start; session->start = (mbedtls_time_t) start;
#endif /* MBEDTLS_HAVE_TIME */ #endif /* MBEDTLS_HAVE_TIME */
/* /*

View File

@@ -22,7 +22,6 @@
#if defined(MBEDTLS_HAVE_TIME) #if defined(MBEDTLS_HAVE_TIME)
#include <time.h> #include <time.h>
#define mbedtls_time time #define mbedtls_time time
#define mbedtls_time_t time_t
#endif #endif
#define mbedtls_printf printf #define mbedtls_printf printf
#define mbedtls_calloc calloc #define mbedtls_calloc calloc