Skip to content

Commit ef7d883

Browse files
committed
secure_storage: re-add MbedTLS backend
Re-add the option to use the MbedTLS ITS backend on posix. This backend is much simpler to setup than the Zephyr backends in a testing environment. This was previously removed in: zephyrproject-rtos#82319 Signed-off-by: Jordan Yates <[email protected]>
1 parent ff4dc62 commit ef7d883

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

modules/mbedtls/configs/config-tls-generic.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,11 @@
486486
#define MBEDTLS_PSA_CRYPTO_STORAGE_C
487487
#endif
488488

489+
#if defined(CONFIG_SECURE_STORAGE_ITS_IMPLEMENTATION_MBEDTLS)
490+
#define MBEDTLS_PSA_ITS_FILE_C
491+
#define MBEDTLS_FS_IO
492+
#endif
493+
489494
#endif /* CONFIG_MBEDTLS_PSA_CRYPTO_C */
490495

491496
#if defined(CONFIG_MBEDTLS_PSA_STATIC_KEY_SLOTS)

subsys/secure_storage/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ source "subsys/logging/Kconfig.template.log_config"
2727
choice SECURE_STORAGE_ITS_IMPLEMENTATION
2828
prompt "Internal Trusted Storage (ITS) API implementation"
2929

30+
config SECURE_STORAGE_ITS_IMPLEMENTATION_MBEDTLS
31+
bool "MbedTLS ITS implementation"
32+
depends on ARCH_POSIX
33+
help
34+
Use MbedTLS's implementation of the ITS API.
35+
3036
config SECURE_STORAGE_ITS_IMPLEMENTATION_ZEPHYR
3137
bool "Zephyr's ITS implementation"
3238
select SECURE_STORAGE_ITS_TRANSFORM_MODULE

tests/bsim/bluetooth/mesh/overlay_pst.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CONFIG_FLASH=y
44
CONFIG_FLASH_MAP=y
55
CONFIG_NVS=y
66
CONFIG_SECURE_STORAGE=y
7+
CONFIG_SECURE_STORAGE_ITS_IMPLEMENTATION_ZEPHYR=y
78

89
CONFIG_BT_PERIPHERAL=y
910
CONFIG_BT_MESH_GATT_PROXY=y

0 commit comments

Comments
 (0)