mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
feat(mbedtls): update to 3.5.0 release
Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.5.0
This commit is contained in:
parent
10ef082950
commit
97fe016e4e
@ -108,9 +108,13 @@ list(REMOVE_ITEM src_x509 x509_crt.c)
|
||||
set_property(TARGET mbedx509 PROPERTY SOURCES ${src_x509})
|
||||
endif()
|
||||
|
||||
# Core libraries from the mbedTLS project
|
||||
set(mbedtls_targets mbedtls mbedcrypto mbedx509)
|
||||
# 3rd party libraries from the mbedTLS project
|
||||
list(APPEND mbedtls_targets everest p256m)
|
||||
|
||||
set(mbedtls_target_sources "${COMPONENT_DIR}/port/mbedtls_debug.c")
|
||||
set(mbedtls_target_sources "${COMPONENT_DIR}/port/mbedtls_debug.c"
|
||||
"${COMPONENT_DIR}/port/esp_platform_time.c")
|
||||
|
||||
if(CONFIG_MBEDTLS_DYNAMIC_BUFFER)
|
||||
set(mbedtls_target_sources ${mbedtls_target_sources}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 727a037da6f9a62a9d3d5def5bd21a2bc9c621c6
|
||||
Subproject commit dd91f30058dfad68d80267cc82cd8472c4aa54b5
|
25
components/mbedtls/port/esp_platform_time.c
Normal file
25
components/mbedtls/port/esp_platform_time.c
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "mbedtls/build_info.h"
|
||||
#include "mbedtls/platform_time.h"
|
||||
|
||||
#ifdef MBEDTLS_PLATFORM_MS_TIME_ALT
|
||||
mbedtls_ms_time_t mbedtls_ms_time()
|
||||
{
|
||||
int ret;
|
||||
struct timespec tv = {};
|
||||
mbedtls_ms_time_t current_ms;
|
||||
|
||||
ret = clock_gettime(CLOCK_MONOTONIC, &tv);
|
||||
if (ret) {
|
||||
return time(NULL) * 1000L;
|
||||
}
|
||||
|
||||
current_ms = tv.tv_sec;
|
||||
return current_ms * 1000L + tv.tv_nsec / 1000000L;
|
||||
}
|
||||
#endif // MBEDTLS_PLATFORM_MS_TIME_ALT
|
@ -56,8 +56,15 @@
|
||||
*/
|
||||
#ifdef CONFIG_MBEDTLS_HAVE_TIME
|
||||
#define MBEDTLS_HAVE_TIME
|
||||
/**
|
||||
* \def MBEDTLS_PLATFORM_MS_TIME_ALT
|
||||
*
|
||||
* Define platform specific function to get time since bootup in milliseconds.
|
||||
*/
|
||||
#define MBEDTLS_PLATFORM_MS_TIME_ALT
|
||||
#else
|
||||
#undef MBEDTLS_HAVE_TIME
|
||||
#undef MBEDTLS_PLATFORM_MS_TIME_ALT
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user