Skip to content

Commit 6ac3693

Browse files
Merge pull request #10423 from bjwtaylor/time_t
Replace cases of time_t with mbedtls_time_t
2 parents 2706002 + c797a35 commit 6ac3693

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

ChangeLog.d/replace_time_t.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Bugfix
2+
* Fix a build error or incorrect TLS session
3+
lifetime on platforms where mbedtls_time_t
4+
is not time_t. Fixes #10236.

library/ssl_tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3178,7 +3178,7 @@ static int ssl_tls12_session_load(mbedtls_ssl_session *session,
31783178
start = MBEDTLS_GET_UINT64_BE(p, 0);
31793179
p += 8;
31803180

3181-
session->start = (time_t) start;
3181+
session->start = (mbedtls_time_t) start;
31823182
#endif /* MBEDTLS_HAVE_TIME */
31833183

31843184
/*

programs/test/udp_proxy.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#if defined(MBEDTLS_HAVE_TIME)
2626
#include <time.h>
2727
#define mbedtls_time time
28-
#define mbedtls_time_t time_t
2928
#endif
3029
#define mbedtls_printf printf
3130
#define mbedtls_calloc calloc

0 commit comments

Comments
 (0)