fix(mbedtls): allow to use built in entropy implementation for linux target

This commit is contained in:
Mahavir Jain
2023-10-11 13:41:37 +05:30
parent 4ea0538a88
commit 804ed172dd
2 changed files with 8 additions and 2 deletions

View File

@@ -192,8 +192,10 @@ if(AES_PERIPHERAL_TYPE STREQUAL "dma")
endif()
target_sources(mbedcrypto PRIVATE "${COMPONENT_DIR}/port/esp_hardware.c"
"${COMPONENT_DIR}/port/esp_mem.c"
if(NOT ${IDF_TARGET} STREQUAL "linux")
target_sources(mbedcrypto PRIVATE "${COMPONENT_DIR}/port/esp_hardware.c")
endif()
target_sources(mbedcrypto PRIVATE "${COMPONENT_DIR}/port/esp_mem.c"
"${COMPONENT_DIR}/port/esp_timing.c"
)

View File

@@ -232,6 +232,7 @@
#undef MBEDTLS_ECP_VERIFY_ALT_SOFT_FALLBACK
#endif
#ifndef CONFIG_IDF_TARGET_LINUX
/**
* \def MBEDTLS_ENTROPY_HARDWARE_ALT
*
@@ -244,6 +245,7 @@
* Uncomment to use your own hardware entropy collector.
*/
#define MBEDTLS_ENTROPY_HARDWARE_ALT
#endif // !CONFIG_IDF_TARGET_LINUX
/**
* \def MBEDTLS_AES_ROM_TABLES
@@ -866,6 +868,7 @@
*/
#define MBEDTLS_FS_IO
#ifndef CONFIG_IDF_TARGET_LINUX
/**
* \def MBEDTLS_NO_PLATFORM_ENTROPY
*
@@ -876,6 +879,7 @@
* Uncomment this macro to disable the built-in platform entropy functions.
*/
#define MBEDTLS_NO_PLATFORM_ENTROPY
#endif // !CONFIG_IDF_TARGET_LINUX
/**
* \def MBEDTLS_PK_RSA_ALT_SUPPORT