Skip to content

Commit 72dbf74

Browse files
valeriosettiVge0rge
authored andcommitted
[nrf fromtree] bluetooth: mesh: use new Kconfig CONFIG_PSA_CRYPTO
Remove previous Kconfig choices CONFIG_BT_MESH_USES_MBEDTLS_PSA and CONFIG_BT_MESH_USES_TFM_PSA and use CONFIG_PSA_CRYPTO instead. This commit also updates test code accordingly. Signed-off-by: Valerio Setti <[email protected]> (cherry picked from commit 92025221119526efa1fa8444b1186b3cd2264742)
1 parent e2fd60c commit 72dbf74

File tree

6 files changed

+17
-26
lines changed

6 files changed

+17
-26
lines changed

doc/releases/migration-guide-4.3.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ Bluetooth HCI
120120
* The deprecated ``ipm`` value was removed from ``bt-hci-bus`` devicetree property.
121121
``ipc`` should be used instead.
122122

123+
Bluetooth Mesh
124+
==============
125+
126+
* Kconfigs ``CONFIG_BT_MESH_USES_MBEDTLS_PSA`` and ``CONFIG_BT_MESH_USES_TFM_PSA`` have
127+
been removed. The selection of the PSA Crypto provider is now automatically controlled
128+
by Kconfig :kconfig:option:`CONFIG_PSA_CRYPTO`.
129+
123130
Ethernet
124131
========
125132

subsys/bluetooth/mesh/Kconfig

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,17 +1507,10 @@ config BT_MESH_SECURE_STORAGE
15071507
bool
15081508
depends on SECURE_STORAGE
15091509

1510-
choice BT_MESH_CRYPTO_LIB
1511-
prompt "Crypto library:"
1512-
default BT_MESH_USES_TFM_PSA if BUILD_WITH_TFM
1513-
default BT_MESH_USES_MBEDTLS_PSA
1514-
help
1515-
Crypto library selection for mesh security.
1516-
1517-
config BT_MESH_USES_MBEDTLS_PSA
1518-
bool "mbed TLS PSA"
1519-
select MBEDTLS
1520-
select MBEDTLS_PSA_CRYPTO_C
1510+
config BT_MESH_CRYPTO_LIB
1511+
bool
1512+
default y
1513+
select PSA_CRYPTO
15211514
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
15221515
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT
15231516
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE
@@ -1532,18 +1525,9 @@ config BT_MESH_USES_MBEDTLS_PSA
15321525
select PSA_WANT_ALG_ECDH
15331526
select PSA_WANT_ECC_SECP_R1_256
15341527
select BT_MESH_SECURE_STORAGE if BT_SETTINGS
1535-
imply MBEDTLS_AES_ROM_TABLES
1528+
imply MBEDTLS_AES_ROM_TABLES if PSA_CRYPTO_PROVIDER_MBEDTLS
15361529
help
1537-
Use Mbed TLS as PSA Crypto API provider.
1538-
1539-
config BT_MESH_USES_TFM_PSA
1540-
bool "TF-M PSA"
1541-
depends on BUILD_WITH_TFM
1542-
help
1543-
Use TF-M as PSA Crypto API provider. This is only possible on platforms
1544-
that support TF-M.
1545-
1546-
endchoice
1530+
Crypto library support for mesh security.
15471531

15481532
menu "Beacons"
15491533

tests/bluetooth/mesh/brg/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ target_compile_options(app
2020
-DCONFIG_BT_SETTINGS
2121
-DCONFIG_BT_MESH_BRG_CFG_SRV
2222
-DCONFIG_BT_MESH_BRG_TABLE_ITEMS_MAX=16
23-
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA)
23+
-DCONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS)

tests/bluetooth/mesh/delayable_msg/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ target_compile_options(app
2121
-DCONFIG_BT_MESH_ACCESS_DELAYABLE_MSG_COUNT=4
2222
-DCONFIG_BT_MESH_ACCESS_DELAYABLE_MSG_CHUNK_SIZE=20
2323
-DCONFIG_BT_MESH_ACCESS_DELAYABLE_MSG_CHUNK_COUNT=20
24-
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA)
24+
-DCONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS)

tests/bluetooth/mesh/rpl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ target_compile_options(app
2020
-DCONFIG_BT_MESH_CRPL=10
2121
-DCONFIG_BT_MESH_RPL_STORE_TIMEOUT=1
2222
-DCONFIG_BT_SETTINGS
23-
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA)
23+
-DCONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS)

tests/bsim/bluetooth/mesh/src/mesh_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ void bt_mesh_device_setup(const struct bt_mesh_prov *prov, const struct bt_mesh_
292292

293293
if (IS_ENABLED(CONFIG_BT_SETTINGS)) {
294294
LOG_INF("Loading stored settings");
295-
if (IS_ENABLED(CONFIG_BT_MESH_USES_MBEDTLS_PSA)) {
295+
if (IS_ENABLED(CONFIG_PSA_CRYPTO_PROVIDER_MBEDTLS)) {
296296
settings_load_subtree("itsemul");
297297
}
298298
settings_load_subtree("bt");

0 commit comments

Comments
 (0)