Skip to content

Commit 516886b

Browse files
valeriosettinashif
authored andcommitted
mbedtls: MBEDTLS_ENTROPY_POLL_ZEPHYR default on if MBEDTLS_ENTROPY_C
As long as MBEDTLS_ENTROPY_C is enabled, Mbed TLS needs to poll some entropy source to gather data that will then be processed by CTR/HMAC-DRBG modules. This means that in most of the cases, once MBEDTLS_ENTROPY_C is enabled then also MBEDTLS_ENTROPY_POLL_ZEPHYR needs to be enabled. This was done manually until now, as the long list of samples/tests demonstrate. This commit solves this dependency by defaulting MBEDTLS_ENTROPY_POLL_ZEPHYR to on as soon as MBEDTLS_ENTROPY_C is set. As a consequence, all manual enablement of MBEDTLS_ENTROPY_POLL_ZEPHYR in samples/tests are removed. Signed-off-by: Valerio Setti <[email protected]>
1 parent 08bd9c7 commit 516886b

File tree

12 files changed

+2
-10
lines changed

12 files changed

+2
-10
lines changed

drivers/bluetooth/hci/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ config BT_SILABS_EFR32
112112
select MBEDTLS
113113
select MBEDTLS_PSA_CRYPTO_C
114114
select MBEDTLS_ENTROPY_C
115-
select MBEDTLS_ENTROPY_POLL_ZEPHYR
116115
help
117116
Use Silicon Labs binary Bluetooth library to connect to the
118117
controller.

drivers/wifi/esp32/Kconfig.esp32

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ config ESP32_WIFI_MBEDTLS_CRYPTO
377377
select MBEDTLS_CIPHER_MODE_CTR_ENABLED
378378
select MBEDTLS_CMAC
379379
select MBEDTLS_ENTROPY_C
380-
select MBEDTLS_ENTROPY_POLL_ZEPHYR
381380
help
382381
Select this option to use MbedTLS crypto APIs which utilize hardware acceleration.
383382

modules/mbedtls/Kconfig.tls-generic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ config MBEDTLS_ENTROPY_C
398398

399399
config MBEDTLS_ENTROPY_POLL_ZEPHYR
400400
bool "Provide entropy data to Mbed TLS through entropy driver or random generator"
401+
default y
401402
depends on MBEDTLS_ENTROPY_C
402403
help
403404
Provide entropy data to the Mbed TLS's entropy module through either

samples/net/wifi/shell/boards/frdm_rw612.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ CONFIG_MBEDTLS_USER_CONFIG_FILE="wpa_supp_els_pkc_mbedtls_config.h"
103103
CONFIG_ENTROPY_GENERATOR=y
104104
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
105105
CONFIG_MBEDTLS_ENTROPY_C=y
106-
CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR=y
107106
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=8192
108107

109108
# power management

samples/net/wifi/shell/boards/rd_rw612_bga.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ CONFIG_MBEDTLS_USER_CONFIG_FILE="wpa_supp_els_pkc_mbedtls_config.h"
102102
CONFIG_ENTROPY_GENERATOR=y
103103
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
104104
CONFIG_MBEDTLS_ENTROPY_C=y
105-
CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR=y
106105
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=8192
107106

108107
# power management

samples/psa/its/overlay-entropy_not_secure.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22

33
CONFIG_TEST_RANDOM_GENERATOR=y
44
CONFIG_TIMER_RANDOM_GENERATOR=y
5-
CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR=y

samples/psa/persistent_key/overlay-entropy_not_secure.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22

33
CONFIG_TEST_RANDOM_GENERATOR=y
44
CONFIG_TIMER_RANDOM_GENERATOR=y
5-
CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR=y

subsys/bluetooth/mesh/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,6 @@ config BT_MESH_USES_MBEDTLS_PSA
14761476
select EXPERIMENTAL
14771477
select MBEDTLS
14781478
select MBEDTLS_ENTROPY_C
1479-
select MBEDTLS_ENTROPY_POLL_ZEPHYR
14801479
select MBEDTLS_PSA_CRYPTO_C
14811480
select MBEDTLS_USE_PSA_CRYPTO
14821481
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT

tests/modules/uoscore/prj.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ CONFIG_MBEDTLS=y
1313
CONFIG_MBEDTLS_ENABLE_HEAP=y
1414
CONFIG_MBEDTLS_HEAP_SIZE=2048
1515
CONFIG_MBEDTLS_ENTROPY_C=y
16-
CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR=y
1716

1817
# PSA Crypto options
1918

tests/subsys/secure_storage/psa/crypto/overlay-secure_storage.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ CONFIG_MAIN_STACK_SIZE=2048
44
CONFIG_MBEDTLS=y
55
CONFIG_TEST_RANDOM_GENERATOR=y
66
CONFIG_TIMER_RANDOM_GENERATOR=y
7-
CONFIG_MBEDTLS_ENTROPY_POLL_ZEPHYR=y
87
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
98

109
CONFIG_SECURE_STORAGE=y

0 commit comments

Comments
 (0)