From deef905a1c5fff195ae7ddaacc54121836b39262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Wed, 19 Oct 2022 11:02:15 +0200 Subject: [PATCH] Update is_builtin_calling_md() for PKCS#1 v2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since https://github.com/Mbed-TLS/mbedtls/pull/6141 it can "fall back" to PSA when MD is not available (but will use MD if available, to preserve backwards compatibility). Signed-off-by: Manuel Pégourié-Gonnard --- .../suites/test_suite_psa_crypto_storage_format.function | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/suites/test_suite_psa_crypto_storage_format.function b/tests/suites/test_suite_psa_crypto_storage_format.function index 31d3cb45d..1fd267a6c 100644 --- a/tests/suites/test_suite_psa_crypto_storage_format.function +++ b/tests/suites/test_suite_psa_crypto_storage_format.function @@ -86,11 +86,19 @@ static int is_builtin_calling_md( psa_algorithm_t alg ) { #if defined(MBEDTLS_PSA_BUILTIN_ALG_RSA_PSS) if( PSA_ALG_IS_RSA_PSS( alg ) ) +#if defined(MBEDTLS_MD_C) return( 1 ); +#else + return( 0 ); +#endif #endif #if defined(MBEDTLS_PSA_BUILTIN_ALG_RSA_OAEP) if( PSA_ALG_IS_RSA_OAEP( alg ) ) +#if defined(MBEDTLS_MD_C) return( 1 ); +#else + return( 0 ); +#endif #endif #if defined(MBEDTLS_PSA_BUILTIN_ALG_DETERMINISTIC_ECDSA) if( PSA_ALG_IS_DETERMINISTIC_ECDSA( alg ) )