Move PSA_PRE_1_0_KEY_DERIVATION to crypto_struct.h

We want to make the PRF context structure depend on this flag, but
crypto_extra.h is included after crypto_struct.h and having the
option at its original place would not affect crypto_struct.h.
This commit is contained in:
Janos Follath 2019-06-11 14:07:27 +01:00
parent 083036af64
commit e3e8166cdd
2 changed files with 11 additions and 10 deletions

View file

@ -224,16 +224,6 @@ void mbedtls_psa_get_stats( mbedtls_psa_stats_t *stats );
psa_status_t mbedtls_psa_inject_entropy(const unsigned char *seed,
size_t seed_size);
/*
* If this option is not turned on, then the function `psa_key_derivation()`
* is removed.
*
* The sole purpose of this option is to make the transition to the new API
* smoother. Once the transition is complete it can and should be removed
* along with the old API and its implementation.
*/
#define PSA_PRE_1_0_KEY_DERIVATION
#if defined(PSA_PRE_1_0_KEY_DERIVATION)
/** Set up a key derivation operation.
*

View file

@ -191,6 +191,17 @@ typedef struct
} psa_hkdf_key_derivation_t;
#endif /* MBEDTLS_MD_C */
/*
* If this option is not turned on, then the function `psa_key_derivation()`
* is removed. And the new psa_tls12_prf_key_derivation_t context is used along
* with the corresponding new API.
*
* The sole purpose of this option is to make the transition to the new API
* smoother. Once the transition is complete it can and should be removed
* along with the old API and its implementation.
*/
#define PSA_PRE_1_0_KEY_DERIVATION
#if defined(MBEDTLS_MD_C)
typedef struct psa_tls12_prf_key_derivation_s
{