From a17ffc7a0bbeaae9110b43fa175281bd67594ace Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Mon, 2 Dec 2024 23:57:30 +0000 Subject: [PATCH] test suites: Refactored component_test_ccm_aes_sha256. This commit moves the tf-psa-crypto configuration options for this test to `crypto-config-ccm-aes-sha256.h`. A blank MbedTLS configuration file is now used for the library side. Signed-off-by: Minos Galanakis --- configs/crypto-config-ccm-aes-sha256.h | 5 +++++ tests/scripts/components-configuration-crypto.sh | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/configs/crypto-config-ccm-aes-sha256.h b/configs/crypto-config-ccm-aes-sha256.h index 68a9c0a539..be8a7467eb 100644 --- a/configs/crypto-config-ccm-aes-sha256.h +++ b/configs/crypto-config-ccm-aes-sha256.h @@ -20,4 +20,9 @@ #define PSA_WANT_KEY_TYPE_AES 1 #define PSA_WANT_KEY_TYPE_RAW_DATA 1 + +#define MBEDTLS_PSA_CRYPTO_C +#define MBEDTLS_CTR_DRBG_C +#define MBEDTLS_ENTROPY_C + #endif /* PSA_CRYPTO_CONFIG_H */ diff --git a/tests/scripts/components-configuration-crypto.sh b/tests/scripts/components-configuration-crypto.sh index 3c897ebebc..fe8fe913a0 100644 --- a/tests/scripts/components-configuration-crypto.sh +++ b/tests/scripts/components-configuration-crypto.sh @@ -2165,12 +2165,8 @@ component_test_aead_only_ccm () { component_test_ccm_aes_sha256 () { msg "build: CCM + AES + SHA256 configuration" - cp "tf-psa-crypto/tests/configs/config_test_driver.h" "$CONFIG_H" - head -n -1 configs/crypto-config-ccm-aes-sha256.h > "$CRYPTO_CONFIG_H" - echo "#define MBEDTLS_PSA_CRYPTO_C" >> "$CRYPTO_CONFIG_H" - echo "#define MBEDTLS_CTR_DRBG_C" >> "$CRYPTO_CONFIG_H" - echo "#define MBEDTLS_ENTROPY_C" >> "$CRYPTO_CONFIG_H" - echo "#endif /* PSA_CRYPTO_CONFIG_H */" >> "$CRYPTO_CONFIG_H" + # Setting a blank config disables everyhing in the library side. + echo '#define MBEDTLS_CONFIG_H ' >"$CONFIG_H" make msg "test: CCM + AES + SHA256 configuration" make test