From 7a27e85f5cd4addd13ec52c0d0c204339c8c1aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 27 Jul 2022 12:30:34 +0200 Subject: [PATCH] Fix failure of RSA accel test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously MD_C was auto-enabled based on the fact that ALG_RSA_PSS was requested, but that's no longer the case since the previous commit. We can fix this in one of two ways: either enable MD_C, or enable all the PSA_WANT_ALG_SHA_xxx that are needed for test. Go for MD_C because it's a single line and avoids having to enumerate a list that might grow in the future. Signed-off-by: Manuel Pégourié-Gonnard --- tests/include/test/drivers/config_test_driver.h | 1 + tests/scripts/all.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tests/include/test/drivers/config_test_driver.h b/tests/include/test/drivers/config_test_driver.h index b9ba5fb5f..6a7fb1f3e 100644 --- a/tests/include/test/drivers/config_test_driver.h +++ b/tests/include/test/drivers/config_test_driver.h @@ -48,6 +48,7 @@ //#define MBEDTLS_SHA1_C //#define MBEDTLS_SHA384_C //#define MBEDTLS_SHA512_C +//#define MBEDTLS_MD_C //#define MBEDTLS_PEM_PARSE_C //#define MBEDTLS_BASE64_C diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 04a1cd6f8..e5d3afc7b 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -1759,6 +1759,8 @@ component_test_psa_crypto_config_accel_rsa_signature () { scripts/config.py -f tests/include/test/drivers/config_test_driver.h set MBEDTLS_SHA1_C scripts/config.py -f tests/include/test/drivers/config_test_driver.h set MBEDTLS_SHA512_C + # We need to define either MD_C or all of the PSA_WANT_ALG_SHAxxx. + scripts/config.py -f tests/include/test/drivers/config_test_driver.h set MBEDTLS_MD_C # We need PEM parsing in the test library as well to support the import # of PEM encoded RSA keys. scripts/config.py -f tests/include/test/drivers/config_test_driver.h set MBEDTLS_PEM_PARSE_C @@ -1771,6 +1773,7 @@ component_test_psa_crypto_config_accel_rsa_signature () { # Restore test driver base configuration scripts/config.py -f tests/include/test/drivers/config_test_driver.h unset MBEDTLS_SHA1_C scripts/config.py -f tests/include/test/drivers/config_test_driver.h unset MBEDTLS_SHA512_C + scripts/config.py -f tests/include/test/drivers/config_test_driver.h unset MBEDTLS_MD_C scripts/config.py -f tests/include/test/drivers/config_test_driver.h unset MBEDTLS_PEM_PARSE_C scripts/config.py -f tests/include/test/drivers/config_test_driver.h unset MBEDTLS_BASE64_C