From 5a39c4ecf2a065d454f01bd00656fdea9d782f73 Mon Sep 17 00:00:00 2001 From: Matthias Schulz Date: Thu, 9 Nov 2023 15:53:01 +0100 Subject: [PATCH] Fixes https://github.com/Mbed-TLS/mbedtls/issues/6910 as proposed in https://github.com/Mbed-TLS/mbedtls/issues/6910#issuecomment-1573301661 Signed-off-by: Matthias Schulz --- include/psa/crypto_extra.h | 3 +++ include/psa/crypto_struct.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/include/psa/crypto_extra.h b/include/psa/crypto_extra.h index ef29b77db8..75dc262e86 100644 --- a/include/psa/crypto_extra.h +++ b/include/psa/crypto_extra.h @@ -486,10 +486,13 @@ psa_status_t mbedtls_psa_inject_entropy(const uint8_t *seed, * \retval #PSA_ERROR_NOT_SUPPORTED \emptydescription * \retval #PSA_ERROR_INSUFFICIENT_MEMORY \emptydescription */ +#if !defined(PSA_SET_KEY_DOMAIN_PARAMETERS) +#define PSA_SET_KEY_DOMAIN_PARAMETERS psa_status_t psa_set_key_domain_parameters(psa_key_attributes_t *attributes, psa_key_type_t type, const uint8_t *data, size_t data_length); +#endif /* PSA_SET_KEY_DOMAIN_PARAMETERS */ /** * \brief Get domain parameters for a key. diff --git a/include/psa/crypto_struct.h b/include/psa/crypto_struct.h index 5639ad05d4..6efa8e72a8 100644 --- a/include/psa/crypto_struct.h +++ b/include/psa/crypto_struct.h @@ -356,10 +356,13 @@ static inline psa_algorithm_t psa_get_key_algorithm( /* This function is declared in crypto_extra.h, which comes after this * header file, but we need the function here, so repeat the declaration. */ +#if !defined(PSA_SET_KEY_DOMAIN_PARAMETERS) +#define PSA_SET_KEY_DOMAIN_PARAMETERS psa_status_t psa_set_key_domain_parameters(psa_key_attributes_t *attributes, psa_key_type_t type, const uint8_t *data, size_t data_length); +#endif /* PSA_SET_KEY_DOMAIN_PARAMETERS */ static inline void psa_set_key_type(psa_key_attributes_t *attributes, psa_key_type_t type)