diff --git a/tests/include/test/psa_crypto_helpers.h b/tests/include/test/psa_crypto_helpers.h index e7b41b22a4..2889513f26 100644 --- a/tests/include/test/psa_crypto_helpers.h +++ b/tests/include/test/psa_crypto_helpers.h @@ -471,6 +471,8 @@ uint64_t mbedtls_test_parse_binary_string(data_t *bin_string); /* A couple of helper macros to verify if MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE is * large enough to contain an RSA key pair of the given size. This is meant to be * used in test cases where MBEDTLS_PSA_STATIC_KEY_SLOTS is enabled. */ +#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) + #if (MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE >= PSA_KEY_EXPORT_RSA_KEY_PAIR_MAX_SIZE(4096)) #define MBEDTLS_TEST_STATIC_KEY_SLOTS_SUPPORT_RSA_4096 #endif @@ -479,6 +481,8 @@ uint64_t mbedtls_test_parse_binary_string(data_t *bin_string); #define MBEDTLS_TEST_STATIC_KEY_SLOTS_SUPPORT_RSA_2048 #endif +#endif /* MBEDTLS_PSA_CRYPTO_CLIENT */ + /* Helper macro for the PK module to check whether MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE * is large enough to contain 4096 bits RSA key pairs. Of course this check is only * necessary if PK relies on PSA (i.e. MBEDTLS_USE_PSA_CRYPTO) to store and manage