MbedTLS configuration rework
Instead of using config.py to modify the original MbedTLS configuration
file and then extending it with user settings, pass a custom file
which will be used instead of the default file being appended to it.
Also add a stub trng implementation, which results in error if called,
because in case of internal crypto configuration of smmgw SP, trng
shall not be used for X509 related tasks.
libmbedx509.h has been renamed to crypto_provider_x509.h
x509_only.h has been renamed to internal_crypto_smmgw.h
Signed-off-by: Gabor Toth <gabor.toth2@arm.com>
Change-Id: I6831f221d63b64422a28ab75d0faf97771dd5773
diff --git a/deployments/component-test/component-test.cmake b/deployments/component-test/component-test.cmake
index 8d4aaef..c20e2fe 100644
--- a/deployments/component-test/component-test.cmake
+++ b/deployments/component-test/component-test.cmake
@@ -240,7 +240,7 @@
protobuf_generate_all(TGT "component-test" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols")
# MbedTLS
-set(MBEDTLS_USER_CONFIG_FILE "${TS_ROOT}/external/MbedTLS/config/libmbedx509.h"
+set(MBEDTLS_CONFIG_FILE "${TS_ROOT}/external/MbedTLS/config/crypto_provider_x509.h"
CACHE STRING "Configuration file for Mbed TLS" FORCE)
include(${TS_ROOT}/external/MbedTLS/MbedTLS.cmake)
target_link_libraries(component-test PRIVATE MbedTLS::mbedcrypto)
@@ -248,7 +248,7 @@
# Pass the location of the mbedtls config file to C preprocessor.
target_compile_definitions(component-test PRIVATE
- MBEDTLS_USER_CONFIG_FILE="${MBEDTLS_USER_CONFIG_FILE}"
+ MBEDTLS_CONFIG_FILE="${MBEDTLS_CONFIG_FILE}"
)
# Qcbor