bt-host: add option to use PSA APIs instead of TinyCrypt
By enabling CONFIG_BT_USE_PSA_API the user can specify to use PSA APIs instead of TinyCrypt for crypto operations in bluetooth host module. This commit also extends tests/bluetooth/gatt in order to add a PSA test. Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit is contained in:
parent
9032f8d791
commit
814b2ed457
7 changed files with 293 additions and 28 deletions
|
@ -31,10 +31,13 @@ if(CONFIG_BT_HCI_HOST)
|
|||
CONFIG_BT_OBSERVER
|
||||
scan.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_HOST_CRYPTO
|
||||
crypto.c
|
||||
)
|
||||
|
||||
if(CONFIG_BT_USE_PSA_API)
|
||||
zephyr_library_sources_ifdef(CONFIG_BT_HOST_CRYPTO crypto_psa.c)
|
||||
else()
|
||||
zephyr_library_sources_ifdef(CONFIG_BT_HOST_CRYPTO crypto_tc.c)
|
||||
endif()
|
||||
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_ECC
|
||||
ecc.c
|
||||
|
@ -108,6 +111,13 @@ if(CONFIG_BT_CONN_DISABLE_SECURITY)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(CONFIG_BT_USE_PSA_API)
|
||||
zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS mbedTLS)
|
||||
zephyr_library_include_directories_ifdef(CONFIG_BUILD_WITH_TFM
|
||||
$<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/interface/include
|
||||
)
|
||||
endif()
|
||||
|
||||
# Bluetooth Mesh has test dependencies in the host.
|
||||
# In order to compile Bsim tests with these test features
|
||||
# and PSA enabled, the libraries must be linked.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue