Skip to content

Commit 8547add

Browse files
tomi-fontkartben
authored andcommitted
modules: mbedtls: fix ITS configuration on POSIX architecture
Make sure that `MBEDTLS_PSA_ITS_FILE_C` is not defined when `CONFIG_SECURE_STORAGE` is enabled as the former takes precedence over the latter in Mbed TLS (`psa_crypto_storage.c`). This fixes usage of the secure storage subsystem by Mbed TLS on platforms such as `native_sim`. Signed-off-by: Tomi Fontanilles <[email protected]>
1 parent 90ccb28 commit 8547add

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,13 @@
482482
#define MBEDTLS_PSA_P256M_DRIVER_ENABLED
483483
#endif
484484

485-
#if defined(CONFIG_ARCH_POSIX) && !defined(CONFIG_PICOLIBC)
485+
#if defined(CONFIG_ARCH_POSIX) && !defined(CONFIG_PICOLIBC) && !defined(CONFIG_SECURE_STORAGE)
486486
#define MBEDTLS_PSA_ITS_FILE_C
487+
#define MBEDTLS_PSA_CRYPTO_STORAGE_C
487488
#define MBEDTLS_FS_IO
488489
#endif
489490

490-
#if defined(CONFIG_SECURE_STORAGE) || (defined(CONFIG_ARCH_POSIX) && !defined(CONFIG_PICOLIBC))
491+
#if defined(CONFIG_SECURE_STORAGE)
491492
#define MBEDTLS_PSA_CRYPTO_STORAGE_C
492493
#endif
493494

0 commit comments

Comments
 (0)