Merge pull request #219 from ARMmbed/enable_entropy_injection

always compile mbedtls_psa_inject_entropy (#219)
This commit is contained in:
Gilles Peskine 2018-11-22 17:50:54 +01:00 committed by GitHub
commit 30b4641011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,6 @@ extern "C" {
void mbedtls_psa_crypto_free( void );
#if ( defined(MBEDTLS_ENTROPY_NV_SEED) && defined(MBEDTLS_PSA_HAS_ITS_IO) )
/**
* \brief Inject an initial entropy seed for the random generator into
* secure storage.
@ -89,13 +88,20 @@ void mbedtls_psa_crypto_free( void );
*
* This is an Mbed TLS extension.
*
* \param seed[in] Buffer containing the seed value to inject.
* \param seed_size Size of the \p seed buffer.
* The size of the seed in bytes must be greater
* or equal to both #MBEDTLS_ENTROPY_MIN_PLATFORM
* and #MBEDTLS_ENTROPY_BLOCK_SIZE.
* It must be less or equal to
* #MBEDTLS_ENTROPY_MAX_SEED_SIZE.
* \note This function is only available on the following platforms:
* * If the compile-time options MBEDTLS_ENTROPY_NV_SEED and
* MBEDTLS_PSA_HAS_ITS_IO are both enabled. Note that you
* must provide compatible implementations of mbedtls_nv_seed_read
* and mbedtls_nv_seed_write.
* * In a client-server integration of PSA Cryptography, on the client side,
* if the server supports this feature.
* \param[in] seed Buffer containing the seed value to inject.
* \param[in] seed_size Size of the \p seed buffer.
* The size of the seed in bytes must be greater
* or equal to both #MBEDTLS_ENTROPY_MIN_PLATFORM
* and #MBEDTLS_ENTROPY_BLOCK_SIZE.
* It must be less or equal to
* #MBEDTLS_ENTROPY_MAX_SEED_SIZE.
*
* \retval #PSA_SUCCESS
* The seed value was injected successfully. The random generator
@ -114,7 +120,6 @@ void mbedtls_psa_crypto_free( void );
psa_status_t mbedtls_psa_inject_entropy(const unsigned char *seed,
size_t seed_size);
#endif
#ifdef __cplusplus
}