mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2024-12-28 15:17:21 +00:00
psa: move definition of MBEDTLS_PSA_KEY_BUFFER_MAX_SIZE
MBEDTLS_PSA_KEY_BUFFER_MAX_SIZE is only used in tests so it should not be defined in a public header such as "crypto_extra.h". "psa_crypto_helpers.h" is a better option. Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
cac061f1d4
commit
4cfec6ffbe
@ -476,6 +476,13 @@ uint64_t mbedtls_test_parse_binary_string(data_t *bin_string);
|
||||
|
||||
#endif /* MBEDTLS_PSA_CRYPTO_CLIENT */
|
||||
|
||||
/* Helper macro to get the size of the each key slot buffer. */
|
||||
#if defined(MBEDTLS_PSA_STATIC_KEY_SLOTS)
|
||||
#define MBEDTLS_PSA_KEY_BUFFER_MAX_SIZE MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE
|
||||
#else
|
||||
#define MBEDTLS_PSA_KEY_BUFFER_MAX_SIZE SIZE_MAX
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
|
@ -42,13 +42,6 @@ extern "C" {
|
||||
PSA_EXPORT_KEY_PAIR_OR_PUBLIC_MAX_SIZE : PSA_CIPHER_MAX_KEY_LENGTH)
|
||||
#endif /* !MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE*/
|
||||
|
||||
/* Define the size of the each key slot buffer. */
|
||||
#if defined(MBEDTLS_PSA_STATIC_KEY_SLOTS)
|
||||
#define MBEDTLS_PSA_KEY_BUFFER_MAX_SIZE MBEDTLS_PSA_STATIC_KEY_SLOT_BUFFER_SIZE
|
||||
#else
|
||||
#define MBEDTLS_PSA_KEY_BUFFER_MAX_SIZE SIZE_MAX
|
||||
#endif
|
||||
|
||||
/** \addtogroup attributes
|
||||
* @{
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user