mbed-crypto: Automatically enable entropy injection

Automatically enable entropy injection when the NV Seed feature is
requested on PSA targets. Add a warning note describing the state of the
current implementation of the entropy injection API.

Fixes #10720
pull/10722/head
Jaeden Amero 2019-05-28 10:54:22 +01:00
parent 9cc1caa031
commit 4feb15c76a
1 changed files with 8 additions and 0 deletions

View File

@ -33,6 +33,14 @@
#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbed_default_seed_write
#endif
/* Automatically enable the Mbed Crypto entropy injection API if
* MBEDTLS_ENTROPY_NV_SEED is enabled. WARNING: the current implementation of
* the Mbed Crypto entropy injection API is incompatible with other entropy
* sources. When MBEDTLS_ENTROPY_NV_SEED is used on PSA target, the NV Seed is
* the sole source of entropy and all other entropy sources are ignored. */
#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
#define MBEDTLS_PSA_INJECT_ENTROPY
#endif // (defined(TARGET_PSA) && defined(MBEDTLS_ENTROPY_NV_SEED))
#if DEVICE_TRNG