File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -4639,6 +4639,15 @@ psa_status_t psa_crypto_init( void )
46394639
46404640 /* Initialize the random generator. */
46414641 global_data .entropy_init ( & global_data .entropy );
4642+ #if defined(MBEDTLS_PSA_INJECT_ENTROPY ) && \
4643+ defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES )
4644+ /* The PSA entropy injection feature depends on using NV seed as an entropy
4645+ * source. Add NV seed as an entropy source for PSA entropy injection. */
4646+ mbedtls_entropy_add_source ( & global_data .entropy ,
4647+ mbedtls_nv_seed_poll , NULL ,
4648+ MBEDTLS_ENTROPY_BLOCK_SIZE ,
4649+ MBEDTLS_ENTROPY_SOURCE_STRONG );
4650+ #endif
46424651 mbedtls_ctr_drbg_init ( & global_data .ctr_drbg );
46434652 global_data .rng_state = RNG_INITIALIZED ;
46444653 status = mbedtls_to_psa_error (
You can’t perform that action at this time.
0 commit comments