Skip to content

Commit 63fc722

Browse files
committed
bluetooth: mesh: Update PSA crypto configuration
The Kconfig options CONFIG_BT_MESH_USES_MBEDTLS_PSA and CONFIG_BT_MESH_USES_TFM_PSA have been removed from Zephyr. The selection of the PSA Crypto provider is now automatically controlled by Kconfig CONFIG_PSA_CRYPTO. This updates the bluetooth mesh subsystem and tests to follow the approach of choosing a PSA crypto provider. Ref: NCSDK-35983 Signed-off-by: Georgios Vasilakis <[email protected]>
1 parent 1aecc0d commit 63fc722

File tree

16 files changed

+19
-16
lines changed

16 files changed

+19
-16
lines changed

subsys/bluetooth/mesh/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ zephyr_library_sources_ifdef(CONFIG_BT_MESH_RPL_STORAGE_MODE_EMDS rpl.c)
8383

8484
zephyr_library_sources_ifdef(CONFIG_BT_MESH_KEY_IMPORTER key_importer.c)
8585

86-
if(CONFIG_BT_MESH_USES_MBEDTLS_PSA AND (NOT CONFIG_SOC_FAMILY_NORDIC_NRF))
86+
if(CONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS AND (NOT CONFIG_SOC_FAMILY_NORDIC_NRF))
8787
zephyr_library_link_libraries(mbedTLS)
8888
endif()

subsys/bluetooth/mesh/Kconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ config BT_MESH_ADV_STACK_SIZE
2222

2323
endif # SOC_SERIES_NRF54LX
2424

25-
if BT_MESH_USES_MBEDTLS_PSA
25+
if BT_MESH_CRYPTO_LIB
26+
27+
if !BUILD_WITH_TFM
2628

2729
config BT_MESH_MBEDTLS_BACKEND_ENABLE
2830
bool
@@ -37,6 +39,7 @@ config MBEDTLS_HEAP_SIZE
3739
default 2048 if BT_MESH_DFD_SRV
3840
default 1152 if BT_MESH_NLC_PERF_BASELINE
3941
default 1024
42+
endif # !BUILD_WITH_TFM
4043

4144
if BT_SETTINGS
4245

tests/subsys/bluetooth/mesh/light_ctrl/boards/native_sim.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Enforcing usage of built-in Mbed TLS for native simulator.
33
CONFIG_MBEDTLS=y
44
CONFIG_MBEDTLS_BUILTIN=y
5-
CONFIG_BT_MESH_USES_MBEDTLS_PSA=y
5+
CONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS=y

tests/subsys/bluetooth/mesh/light_hue/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ target_compile_options(app
2828
-DCONFIG_BT_MESH_MOD_ACKD_TIMEOUT_BASE=3000
2929
-DCONFIG_BT_MESH_MOD_ACKD_TIMEOUT_PER_HOP=50
3030
-DCONFIG_BT_LOG_LEVEL=0
31-
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA=1
31+
-DCONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS=1
3232
)
3333

3434
zephyr_ld_options(

tests/subsys/bluetooth/mesh/light_hue/boards/native_sim.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Enforcing usage of built-in Mbed TLS for native simulator.
33
CONFIG_MBEDTLS=y
44
CONFIG_MBEDTLS_BUILTIN=y
5-
CONFIG_BT_MESH_USES_MBEDTLS_PSA=y
5+
CONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS=y

tests/subsys/bluetooth/mesh/scheduler_model/action_planning/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ target_compile_options(app
3333
-DCONFIG_BT_MESH_MODEL_LOG_LEVEL=0
3434
-DCONFIG_BT_MESH_MOD_ACKD_TIMEOUT_BASE=0
3535
-DCONFIG_BT_MESH_MOD_ACKD_TIMEOUT_PER_HOP=0
36-
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA=1
36+
-DCONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS=1
3737
)
3838

3939
zephyr_ld_options(

tests/subsys/bluetooth/mesh/scheduler_model/action_planning/boards/native_sim.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Enforcing usage of built-in Mbed TLS for native simulator.
33
CONFIG_MBEDTLS=y
44
CONFIG_MBEDTLS_BUILTIN=y
5-
CONFIG_BT_MESH_USES_MBEDTLS_PSA=y
5+
CONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS=y

tests/subsys/bluetooth/mesh/scheduler_model/message_validity/boards/native_sim.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Enforcing usage of built-in Mbed TLS for native simulator.
33
CONFIG_MBEDTLS=y
44
CONFIG_MBEDTLS_BUILTIN=y
5-
CONFIG_BT_MESH_USES_MBEDTLS_PSA=y
5+
CONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS=y

tests/subsys/bluetooth/mesh/scheduler_model/timing/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ target_compile_options(app
2929
-DCONFIG_BT_MESH_MODEL_GROUP_COUNT=5
3030
-DCONFIG_BT_LOG_LEVEL=0
3131
-DCONFIG_BT_MESH_SCHEDULER_SRV=1
32-
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA=1
32+
-DCONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS=1
3333
)
3434

3535
zephyr_ld_options(

tests/subsys/bluetooth/mesh/scheduler_model/timing/boards/native_sim.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Enforcing usage of built-in Mbed TLS for native simulator.
33
CONFIG_MBEDTLS=y
44
CONFIG_MBEDTLS_BUILTIN=y
5-
CONFIG_BT_MESH_USES_MBEDTLS_PSA=y
5+
CONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS=y

0 commit comments

Comments
 (0)