Skip to content

Commit d065e08

Browse files
tomi-fontmif1-nordic
authored andcommitted
[nrf noup] modules: mbedtls: do not always enable entropy on MBEDTLS_PSA_CRYPTO_C
This is actually a fromtree of upstream PR # 108256 (commit 21e55f2) but the cherry-pick conflicts too badly. This will be reverted and cherry-picked properly from upstream in the Mbed TLS update PR. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
1 parent 8eb7849 commit d065e08

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

modules/mbedtls/Kconfig.tf-psa-crypto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ config MBEDTLS_PKCS5_C
412412
choice MBEDTLS_PSA_CRYPTO_RNG_SOURCE
413413
prompt "PSA crypto random source"
414414
depends on MBEDTLS_PSA_CRYPTO_C
415-
default MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG if CSPRNG_ENABLED
415+
default MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG if CSPRNG_ENABLED \
416+
|| !PSA_CRYPTO_PROVIDER_MBEDTLS
416417
default MBEDTLS_PSA_CRYPTO_LEGACY_RNG
417418

418419
config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
@@ -467,7 +468,7 @@ config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG
467468
config MBEDTLS_PSA_CRYPTO_C
468469
bool "Platform Security Architecture cryptography API"
469470
depends on !BUILD_WITH_TFM
470-
select CSPRNG_NEEDED
471+
select CSPRNG_NEEDED if PSA_CRYPTO_PROVIDER_MBEDTLS
471472

472473
config MBEDTLS_USE_PSA_CRYPTO
473474
bool "Use PSA APIs instead of legacy MbedTLS when possible"

0 commit comments

Comments
 (0)