Skip to content

Commit 293f6cf

Browse files
committed
[nrf noup] Remove check for P256M
TF-M checks if P256M is available during build time using MBEDCRYPTO_PATH which is set to the TF-M repo to use custom mbed TLS cmake configurations, but this means the script can not be found. But as mbed TLS software crypto is not used anyway we can hardcode P256M to be disabled. Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no> Change-Id: I94fde1f41e3493e840823cae284256176a364863 Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
1 parent db18f3f commit 293f6cf

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

secure_fw/partitions/crypto/CMakeLists.txt

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,20 +138,8 @@ set(MBEDTLS_TARGET_PREFIX crypto_service_)
138138
#set(MBEDTLS_PSA_CRYPTO_CONFIG_FILE "${TFM_MBEDCRYPTO_PSA_CRYPTO_CONFIG_PATH}")
139139
#set(MBEDTLS_CONFIG_FILE "${TFM_MBEDCRYPTO_CONFIG_PATH}")
140140

141-
# Check if the p256m driver is enabled in the config file, as that will require a
142-
# dedicated target to be linked in. Note that 0 means SUCCESS here, 1 means FAILURE
143-
set(MBEDTLS_P256M_NOT_FOUND 1)
144-
execute_process(COMMAND
145-
${Python3_EXECUTABLE}
146-
${MBEDCRYPTO_PATH}/scripts/config.py -f "${TFM_MBEDCRYPTO_CONFIG_PATH}" get MBEDTLS_PSA_P256M_DRIVER_ENABLED
147-
RESULT_VARIABLE MBEDTLS_P256M_NOT_FOUND)
148-
149-
if (${MBEDTLS_P256M_NOT_FOUND} EQUAL 0)
150-
message(STATUS "[Crypto service] Using P256M software driver in PSA Crypto backend")
151-
set(MBEDTLS_P256M_ENABLED true)
152-
else()
153-
set(MBEDTLS_P256M_ENABLED false)
154-
endif()
141+
# We use hardware acceleration or ocrypto so disable the P256M module by default
142+
set(MBEDTLS_P256M_ENABLED false)
155143

156144
# Mbedcrypto is quite a large lib, and it uses too much memory for it to be
157145
# reasonable to build it in debug info. As a compromise, if `debug` build type

0 commit comments

Comments
 (0)