mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 11:17:20 +02: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:
@@ -108,9 +108,13 @@ list(REMOVE_ITEM src_x509 x509_crt.c)
|
|||||||
set_property(TARGET mbedx509 PROPERTY SOURCES ${src_x509})
|
set_property(TARGET mbedx509 PROPERTY SOURCES ${src_x509})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Core libraries from the mbedTLS project
|
||||||
set(mbedtls_targets mbedtls mbedcrypto mbedx509)
|
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)
|
if(CONFIG_MBEDTLS_DYNAMIC_BUFFER)
|
||||||
set(mbedtls_target_sources ${mbedtls_target_sources}
|
set(mbedtls_target_sources ${mbedtls_target_sources}
|
||||||
|
Submodule components/mbedtls/mbedtls updated: 727a037da6...dd91f30058
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
|
#ifdef CONFIG_MBEDTLS_HAVE_TIME
|
||||||
#define 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
|
#else
|
||||||
#undef MBEDTLS_HAVE_TIME
|
#undef MBEDTLS_HAVE_TIME
|
||||||
|
#undef MBEDTLS_PLATFORM_MS_TIME_ALT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user