bt-mesh: deprecate BT_MESH_USES_TINYCRYPT
Since the TinyCrypt library is being deprecated in Zephyr, this commit set TinyCrypt usage in BT mesh as deprecated and it sets Mbed TLS PSA Crypto API as the default option (when TF-M is not available). Tests are also updated in this commit. Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit is contained in:
parent
f4592382bb
commit
0f4875b7d0
6 changed files with 18 additions and 26 deletions
|
@ -19,4 +19,4 @@ target_compile_options(app
|
|||
-DCONFIG_BT_SETTINGS
|
||||
-DCONFIG_BT_MESH_BRG_CFG_SRV
|
||||
-DCONFIG_BT_MESH_BRG_TABLE_ITEMS_MAX=16
|
||||
-DCONFIG_BT_MESH_USES_TINYCRYPT)
|
||||
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA)
|
||||
|
|
|
@ -20,4 +20,4 @@ target_compile_options(app
|
|||
-DCONFIG_BT_MESH_ACCESS_DELAYABLE_MSG_COUNT=4
|
||||
-DCONFIG_BT_MESH_ACCESS_DELAYABLE_MSG_CHUNK_SIZE=20
|
||||
-DCONFIG_BT_MESH_ACCESS_DELAYABLE_MSG_CHUNK_COUNT=20
|
||||
-DCONFIG_BT_MESH_USES_TINYCRYPT)
|
||||
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA)
|
||||
|
|
|
@ -19,4 +19,4 @@ target_compile_options(app
|
|||
-DCONFIG_BT_MESH_CRPL=10
|
||||
-DCONFIG_BT_MESH_RPL_STORE_TIMEOUT=1
|
||||
-DCONFIG_BT_SETTINGS
|
||||
-DCONFIG_BT_MESH_USES_TINYCRYPT)
|
||||
-DCONFIG_BT_MESH_USES_MBEDTLS_PSA)
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
|
||||
#if defined CONFIG_BT_MESH_USES_MBEDTLS_PSA
|
||||
#include <psa/crypto.h>
|
||||
#elif defined CONFIG_BT_MESH_USES_TINYCRYPT
|
||||
#include <tinycrypt/constants.h>
|
||||
#include <tinycrypt/ecc.h>
|
||||
#include <tinycrypt/ecc_dh.h>
|
||||
#else
|
||||
#error "Unknown crypto library has been chosen"
|
||||
#endif
|
||||
|
@ -435,7 +431,6 @@ static void oob_auth_set(int test_step)
|
|||
prov.input_actions = oob_auth_test_vector[test_step].input_actions;
|
||||
}
|
||||
|
||||
#if defined CONFIG_BT_MESH_USES_MBEDTLS_PSA
|
||||
static void generate_oob_key_pair(void)
|
||||
{
|
||||
psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT;
|
||||
|
@ -470,12 +465,6 @@ static void generate_oob_key_pair(void)
|
|||
|
||||
memcpy(public_key_be, public_key_repr + 1, 64);
|
||||
}
|
||||
#elif defined CONFIG_BT_MESH_USES_TINYCRYPT
|
||||
static void generate_oob_key_pair(void)
|
||||
{
|
||||
ASSERT_TRUE(uECC_make_key(public_key_be, private_key_be, uECC_secp256r1()));
|
||||
}
|
||||
#endif
|
||||
|
||||
static void oob_device(bool use_oob_pk)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue