Skip to content

Commit 3fccf78

Browse files
tomi-fontnordicjm
authored andcommitted
[nrf fromtree] modules: mbedtls: add promptless CONFIG_MBEDTLS_PSA_CRYPTO_STORAGE_C
Add a Kconfig option to match the Mbed TLS define instead of defining it based on CONFIG_SECURE_STORAGE. This gives more flexibility regarding the potential re-definition of the CONFIG_MBEDTLS_PSA_CRYPTO_STORAGE_C Kconfig option. Signed-off-by: Tomi Fontanilles <[email protected]> (cherry picked from commit 8627250) Signed-off-by: Tomi Fontanilles <[email protected]>
1 parent 3cffea3 commit 3fccf78

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

modules/mbedtls/Kconfig.tls-generic

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,9 @@ config MBEDTLS_PSA_P256M_DRIVER_RAW
613613
Warning: Usage of this Kconfig option is prohibited in Zephyr's codebase.
614614
Users can enable it in case of very memory-constrained devices, but be aware that the p256-m interface is absolutely not guaranted to remain stable over time.
615615

616+
config MBEDTLS_PSA_CRYPTO_STORAGE_C
617+
bool
618+
616619
config MBEDTLS_PSA_STATIC_KEY_SLOTS
617620
bool "Use statically allocated key buffers to store key material"
618621
default y if !MBEDTLS_ENABLE_HEAP

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,17 +477,16 @@
477477
#if defined(CONFIG_MBEDTLS_PSA_CRYPTO_C)
478478
#define MBEDTLS_PSA_CRYPTO_C
479479
#define MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS
480+
#endif
480481

481482
#if defined(CONFIG_MBEDTLS_PSA_P256M_DRIVER_ENABLED)
482483
#define MBEDTLS_PSA_P256M_DRIVER_ENABLED
483484
#endif
484485

485-
#if defined(CONFIG_SECURE_STORAGE)
486+
#if defined(CONFIG_MBEDTLS_PSA_CRYPTO_STORAGE_C)
486487
#define MBEDTLS_PSA_CRYPTO_STORAGE_C
487488
#endif
488489

489-
#endif /* CONFIG_MBEDTLS_PSA_CRYPTO_C */
490-
491490
#if defined(CONFIG_MBEDTLS_PSA_STATIC_KEY_SLOTS)
492491
#define MBEDTLS_PSA_STATIC_KEY_SLOTS
493492
#endif

subsys/secure_storage/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
menuconfig SECURE_STORAGE
55
bool "Secure storage subsystem"
66
depends on !BUILD_WITH_TFM
7+
select MBEDTLS_PSA_CRYPTO_STORAGE_C if MBEDTLS_PSA_CRYPTO_C
78
select EXPERIMENTAL
89
help
910
The secure storage subsystem provides an implementation of the PSA Secure Storage API

0 commit comments

Comments
 (0)