From 35d466b8145f489e526a21f8f410cde6a3e690b6 Mon Sep 17 00:00:00 2001 From: "harshal.patil" Date: Tue, 4 Apr 2023 16:24:06 +0530 Subject: [PATCH] mbedtls: fix ci failures for update v3.4.0 - While updating to mbedtls release/v3.4.0, building mbedtls/library/psa_crypto.c, clang produced an unreachable-code warning, so added `-Wno-unreachable-code` compile option for clang. - In `mbedtls/v3.4.0`, the ECDSA restartable sign and verify functions (`ecdsa.c`) were made public. - But the `mbedtls_ecdsa_sign_det_restartable` function prototype was declared in the file `ecdsa.h`, only when `MBEDTLS_ECDSA_SIGN_ALT` was not defined. - added a patch in mbedtls library to fix it. --- components/mbedtls/CMakeLists.txt | 6 ++++++ components/mbedtls/mbedtls | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/mbedtls/CMakeLists.txt b/components/mbedtls/CMakeLists.txt index bb1c11f8df..8f433e4074 100644 --- a/components/mbedtls/CMakeLists.txt +++ b/components/mbedtls/CMakeLists.txt @@ -120,6 +120,12 @@ set(mbedtls_target_sources ${mbedtls_target_sources} "${COMPONENT_DIR}/port/dynamic/esp_ssl_tls.c") endif() +# While updating to MbedTLS release/v3.4.0, building mbedtls/library/psa_crypto.c +# clang produces an unreachable-code warning. +if(CMAKE_C_COMPILER_ID MATCHES "Clang") + target_compile_options(mbedcrypto PRIVATE "-Wno-unreachable-code") +endif() + # net_sockets.c should only be compiled if BSD socket functions are available. # Do this by checking if lwip component is included into the build. idf_build_get_property(build_components BUILD_COMPONENTS) diff --git a/components/mbedtls/mbedtls b/components/mbedtls/mbedtls index 6ee24e3afc..f5fca55508 160000 --- a/components/mbedtls/mbedtls +++ b/components/mbedtls/mbedtls @@ -1 +1 @@ -Subproject commit 6ee24e3afc56db0daa35b17e3a4c455ea24da028 +Subproject commit f5fca55508d9d18961b10824d5cf5d8338c087f6