Bluetooth: Mesh: no more tinycrypt in ble mesh tfm image
PR allows to get rid of tinycrypt objects from the final binary of the ble mesh apps based on PSA TFM crypto. Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
This commit is contained in:
parent
83f9fc4ce2
commit
c5ee143d77
9 changed files with 59 additions and 21 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <errno.h>
|
||||
|
||||
#include <zephyr/bluetooth/mesh.h>
|
||||
#include <zephyr/sys/check.h>
|
||||
|
||||
#define LOG_LEVEL CONFIG_BT_MESH_CRYPTO_LOG_LEVEL
|
||||
#include <zephyr/logging/log.h>
|
||||
|
@ -510,3 +511,12 @@ int bt_mesh_key_compare(const uint8_t raw_key[16], const struct bt_mesh_key *key
|
|||
|
||||
return memcmp(out, raw_key, 16);
|
||||
}
|
||||
|
||||
__weak int bt_rand(void *buf, size_t len)
|
||||
{
|
||||
CHECKIF(buf == NULL || len == 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return psa_generate_random(buf, len) == PSA_SUCCESS ? 0 : -EIO;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue