From e14a45d378fb0118153cfa3ded273583731259fc Mon Sep 17 00:00:00 2001 From: Georgios Vasilakis Date: Mon, 6 Jan 2025 13:36:43 +0100 Subject: [PATCH] nrf_security: Fix dependency for threading_alt.h This fixes a dependency when including the threading_alt.h from nrf_security. The CC3XX platform library provides the implementation of the mbedtls_mutex functions and it expects the mbedTLS mutexes to be of type nrf_cc3xx_platform_mutex_t. The definitions of the mutexes included in the files nrf_cc3xx_platform_mutex_(zephyr/freertos).c The threading_alt.c in nrf_security defines the mbedTLS mutexes as Zephyr mutexes (k_mutex). This doesn't work when the CC3XX platform library is used, so here this dependency is added. Ref: NCSDK-31155 Signed-off-by: Georgios Vasilakis --- subsys/nrf_security/src/threading/threading.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/nrf_security/src/threading/threading.cmake b/subsys/nrf_security/src/threading/threading.cmake index 9bad488ad062..9c870cc95678 100644 --- a/subsys/nrf_security/src/threading/threading.cmake +++ b/subsys/nrf_security/src/threading/threading.cmake @@ -7,7 +7,7 @@ # This file includes threading support required by the PSA crypto core # Which was added in Mbed TLS 3.6.0. -if(CONFIG_MBEDTLS_THREADING_C AND NOT (CONFIG_PSA_CRYPTO_DRIVER_CC3XX OR CONFIG_CC3XX_BACKEND)) +if(CONFIG_MBEDTLS_THREADING_C AND NOT CONFIG_NRF_CC3XX_PLATFORM) append_with_prefix(src_crypto_base ${CMAKE_CURRENT_LIST_DIR} threading_alt.c