tf-psa-crypto: cmake: Use TF-PSA-Crypto config.py

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron 2024-11-22 16:34:57 +01:00
parent 99ed26e0f7
commit 3955d8bdb4

View File

@ -150,11 +150,17 @@ else()
set(TF_PSA_CRYPTO_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) set(TF_PSA_CRYPTO_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
endif() endif()
endif() endif()
if(TF_PSA_CRYPTO_PYTHON_EXECUTABLE)
if(TF_PSA_CRYPTO_PYTHON_EXECUTABLE)
# If 128-bit keys are configured for CTR_DRBG, display an appropriate warning # If 128-bit keys are configured for CTR_DRBG, display an appropriate warning
execute_process(COMMAND ${TF_PSA_CRYPTO_PYTHON_EXECUTABLE} ${MBEDTLS_DIR}/scripts/config.py -f ${MBEDTLS_DIR}/include/mbedtls/mbedtls_config.h get MBEDTLS_CTR_DRBG_USE_128_BIT_KEY execute_process(
RESULT_VARIABLE result) COMMAND
${TF_PSA_CRYPTO_PYTHON_EXECUTABLE} ${TF_PSA_CRYPTO_DIR}/scripts/config.py
-f ${TF_PSA_CRYPTO_DIR}/include/psa/crypto_config.h
get MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
RESULT_VARIABLE
result
)
if(${result} EQUAL 0) if(${result} EQUAL 0)
message(WARNING ${CTR_DRBG_128_BIT_KEY_WARNING}) message(WARNING ${CTR_DRBG_128_BIT_KEY_WARNING})
endif() endif()