Skip to content

Commit

Permalink
mbedtls: fix entropy module enablement
Browse files Browse the repository at this point in the history
- Do not set CONFIG_MBEDTLS_ZEPHYR_ENTROPY in
  tests/crypto/mbedtls because this can cause test failure on
  real devices in which test thread do not have access to
  drivers.
- make MBEDTLS_PSA_CRYPTO_RND_SOURCE depending on
  MBEDTLS_PSA_CRYPTO_C because it only makes sense when the
  latter is defined

Signed-off-by: Valerio Setti <[email protected]>
  • Loading branch information
valeriosetti authored and aescolar committed May 15, 2024
1 parent 59212c1 commit dfae5ba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion modules/mbedtls/Kconfig.tls-generic
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ config MBEDTLS_SSL_EXTENDED_MASTER_SECRET

choice MBEDTLS_PSA_CRYPTO_RND_SOURCE
prompt "Select random source for built-in PSA crypto"
depends on MBEDTLS_PSA_CRYPTO_C
default MBEDTLS_PSA_CRYPTO_LEGACY_RNG

config MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
Expand All @@ -483,7 +484,6 @@ endchoice

config MBEDTLS_PSA_CRYPTO_C
bool "Platform Security Architecture cryptography API"
depends on MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG || MBEDTLS_PSA_CRYPTO_LEGACY_RNG
default y if UOSCORE || UEDHOC

config MBEDTLS_USE_PSA_CRYPTO
Expand Down
1 change: 0 additions & 1 deletion tests/crypto/mbedtls/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ CONFIG_MINIMAL_LIBC=y
CONFIG_MINIMAL_LIBC_NON_REENTRANT_FUNCTIONS=y
CONFIG_MINIMAL_LIBC_RAND=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_MBEDTLS_ZEPHYR_ENTROPY=y
CONFIG_TEST_RANDOM_GENERATOR=y

0 comments on commit dfae5ba

Please sign in to comment.