mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-01-04 07:40:00 +01:00
fix: correct calling to time function in tls13 client&server
Call `mbedtls_time` to handle the case when MBEDTLS_PLATFORM_TIME_MACRO is defined Signed-off-by: Yuxiang Cao <yuxiang.cao@fortanix.com>
This commit is contained in:
parent
50729eac74
commit
da609130f3
|
|
@ -1696,7 +1696,7 @@ static int ssl_tls13_parse_server_hello(mbedtls_ssl_context *ssl,
|
|||
cipher_suite, ciphersuite_info->name));
|
||||
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
ssl->session_negotiate->start = time(NULL);
|
||||
ssl->session_negotiate->start = mbedtls_time(NULL);
|
||||
#endif /* MBEDTLS_HAVE_TIME */
|
||||
|
||||
/* ...
|
||||
|
|
|
|||
|
|
@ -1846,7 +1846,7 @@ static int ssl_tls13_prepare_server_hello(mbedtls_ssl_context *ssl)
|
|||
MBEDTLS_SERVER_HELLO_RANDOM_LEN);
|
||||
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
ssl->session_negotiate->start = time(NULL);
|
||||
ssl->session_negotiate->start = mbedtls_time(NULL);
|
||||
#endif /* MBEDTLS_HAVE_TIME */
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue