mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-04 22:19:05 +00:00
Gate entropy injection through a dedicated configuration option
Entropy injection has specific testing requirements. Therefore it should depend on a specific option.
This commit is contained in:
parent
6bf4baef95
commit
e3dbdd8d90
11 changed files with 125 additions and 31 deletions
|
|
@ -530,6 +530,17 @@
|
|||
#error "MBEDTLS_PSA_CRYPTO_STORAGE_C defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PSA_INJECT_ENTROPY) && \
|
||||
!( defined(MBEDTLS_PSA_CRYPTO_STORAGE_C) && \
|
||||
defined(MBEDTLS_ENTROPY_NV_SEED) )
|
||||
#error "MBEDTLS_PSA_INJECT_ENTROPY defined, but not all prerequisites"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PSA_INJECT_ENTROPY) && \
|
||||
!defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES)
|
||||
#error "MBEDTLS_PSA_INJECT_ENTROPY is not compatible with actual entropy sources"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_PSA_ITS_FILE_C) && \
|
||||
!defined(MBEDTLS_FS_IO)
|
||||
#error "MBEDTLS_PSA_ITS_FILE_C defined, but not all prerequisites"
|
||||
|
|
|
|||
|
|
@ -1251,6 +1251,19 @@
|
|||
*/
|
||||
//#define MBEDTLS_PSA_CRYPTO_SPM
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_PSA_INJECT_ENTROPY
|
||||
*
|
||||
* Enable support for entropy injection at first boot. This feature is
|
||||
* required on systems that do not have a built-in entropy source (TRNG).
|
||||
* This feature is currently not supported on systems that have a built-in
|
||||
* entropy source.
|
||||
*
|
||||
* Requires: MBEDTLS_PSA_CRYPTO_STORAGE_C, MBEDTLS_ENTROPY_NV_SEED
|
||||
*
|
||||
*/
|
||||
//#define MBEDTLS_PSA_INJECT_ENTROPY
|
||||
|
||||
/**
|
||||
* \def MBEDTLS_RSA_NO_CRT
|
||||
*
|
||||
|
|
|
|||
|
|
@ -114,10 +114,9 @@ void mbedtls_psa_crypto_free( void );
|
|||
* This is an Mbed TLS extension.
|
||||
*
|
||||
* \note This function is only available on the following platforms:
|
||||
* * If the compile-time options MBEDTLS_ENTROPY_NV_SEED and
|
||||
* MBEDTLS_PSA_CRYPTO_STORAGE_C are both enabled. Note that you
|
||||
* must provide compatible implementations of mbedtls_nv_seed_read
|
||||
* and mbedtls_nv_seed_write.
|
||||
* * If the compile-time option MBEDTLS_PSA_INJECT_ENTROPY is 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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue