Skip to content

Commit

Permalink
tests: Bluetooth: Mesh: use psa crypto storage in mesh bsim
Browse files Browse the repository at this point in the history
Commit removes PSA ITS emulator and enables usage of
the PSA crypto storage instead.

Signed-off-by: Aleksandr Khromykh <[email protected]>
  • Loading branch information
alxelax committed Nov 29, 2024
1 parent 065bd32 commit 17c7e63
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 228 deletions.
7 changes: 1 addition & 6 deletions modules/mbedtls/configs/config-tls-generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,7 @@
#define MBEDTLS_PSA_P256M_DRIVER_ENABLED
#endif

#if defined(CONFIG_ARCH_POSIX) && !defined(CONFIG_PICOLIBC)
#define MBEDTLS_PSA_ITS_FILE_C
#define MBEDTLS_FS_IO
#endif

#if defined(CONFIG_SECURE_STORAGE) || (defined(CONFIG_ARCH_POSIX) && !defined(CONFIG_PICOLIBC))
#if defined(CONFIG_SECURE_STORAGE)
#define MBEDTLS_PSA_CRYPTO_STORAGE_C
#endif

Expand Down
1 change: 1 addition & 0 deletions subsys/bluetooth/mesh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,7 @@ config BT_MESH_USES_MBEDTLS_PSA
select MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
select PSA_WANT_ECC_SECP_R1_256
select MBEDTLS_PK_WRITE_C
select SECURE_STORAGE if BT_SETTINGS
help
Use Mbed TLS as PSA Crypto API provider. This is useful on platforms
that do not support TF-M.
Expand Down
13 changes: 0 additions & 13 deletions tests/bsim/bluetooth/mesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ if(CONFIG_SETTINGS)
if(CONFIG_BT_MESH_USES_MBEDTLS_PSA)
target_sources(app PRIVATE
src/distribute_keyid.c
src/psa_its_emul.c
)
endif()

Expand Down Expand Up @@ -82,15 +81,3 @@ zephyr_include_directories(
${BSIM_COMPONENTS_PATH}/libUtilv1/src/
${BSIM_COMPONENTS_PATH}/libPhyComv1/src/
)

# The mbedTLS PSA ITS is not thread safe.
# The issue: https://github.com/zephyrproject-rtos/zephyr/issues/59362
# Also, it isn't possible to use "native" ITS implementation since
# mbedTLS includes headers that do not exist.
# This linker option allows linking custom ITS implementation instead of
# precompiled objects from the mbedTLS library to run it in parallel.
if(CONFIG_BT_MESH_USES_MBEDTLS_PSA)
zephyr_ld_options(
${LINKERFLAGPREFIX},--allow-multiple-definition
)
endif()
209 changes: 0 additions & 209 deletions tests/bsim/bluetooth/mesh/src/psa_its_emul.c

This file was deleted.

0 comments on commit 17c7e63

Please sign in to comment.