mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-14 07:20:52 +00:00
psa_crypto_helpers: add guard for MBEDTLS_TEST_STATIC_KEY_SLOTS_SUPPORT_RSA_xxx
PSA_KEY_EXPORT_RSA_KEY_PAIR_MAX_SIZE() is not defined when there is no MBEDTLS_PSA_CRYPTO_CLIENT so we need this guard to define MBEDTLS_TEST_STATIC_KEY_SLOTS_SUPPORT_RSA_[2048/4096]. Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
5fbb0e8829
commit
5c10bc759b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user