Skip to content

Commit 800163b

Browse files
[nrf noup] Revert "[nrf fromtree] bluetooth: mesh: use new Kconfig CONFIG_PSA_CRYPTO"
This reverts commit 179f7f9. Signed-off-by: alperen sener <[email protected]>
1 parent d8f6f94 commit 800163b

File tree

6 files changed

+26
-17
lines changed

6 files changed

+26
-17
lines changed

doc/releases/migration-guide-4.3.rst

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

126-
Bluetooth Mesh
127-
==============
128-
129-
* Kconfigs ``CONFIG_BT_MESH_USES_MBEDTLS_PSA`` and ``CONFIG_BT_MESH_USES_TFM_PSA`` have
130-
been removed. The selection of the PSA Crypto provider is now automatically controlled
131-
by Kconfig :kconfig:option:`CONFIG_PSA_CRYPTO`.
132-
133126
Bluetooth Host
134127
==============
135128

subsys/bluetooth/mesh/Kconfig

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

1510-
config BT_MESH_CRYPTO_LIB
1511-
bool
1512-
default y
1513-
select PSA_CRYPTO
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
15141521
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_IMPORT
15151522
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_EXPORT
15161523
select PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_GENERATE
@@ -1525,9 +1532,18 @@ config BT_MESH_CRYPTO_LIB
15251532
select PSA_WANT_ALG_ECDH
15261533
select PSA_WANT_ECC_SECP_R1_256
15271534
select BT_MESH_SECURE_STORAGE if BT_SETTINGS
1528-
imply MBEDTLS_AES_ROM_TABLES if PSA_CRYPTO_PROVIDER_MBEDTLS
1535+
imply MBEDTLS_AES_ROM_TABLES
15291536
help
1530-
Crypto library support for mesh security.
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
15311547

15321548
menu "Beacons"
15331549

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_PSA_CRYPTO_PROVIDER_MBEDTLS)
23+
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA)

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_PSA_CRYPTO_PROVIDER_MBEDTLS)
24+
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA)

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_PSA_CRYPTO_PROVIDER_MBEDTLS)
23+
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA)

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_PSA_CRYPTO_PROVIDER_MBEDTLS)) {
295+
if (IS_ENABLED(CONFIG_BT_MESH_USES_MBEDTLS_PSA)) {
296296
settings_load_subtree("itsemul");
297297
}
298298
settings_load_subtree("bt");

0 commit comments

Comments
 (0)