nimble: Copied ble_sm_alg.c from v5.2-rc1

This commit is contained in:
Amit Sheth
2025-01-24 13:11:29 +05:30
committed by Kewal M. Shah
parent eeb9c84dc0
commit c691e80043
+6 -1
View File
@@ -23,6 +23,7 @@
#include "syscfg/syscfg.h"
#include "nimble/nimble_opt.h"
#if NIMBLE_BLE_CONNECT
#if NIMBLE_BLE_SM
#include "nimble/ble.h"
@@ -726,7 +727,10 @@ ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv)
return 0;
}
#if !(MYNEWT_VAL(BLE_CRYPTO_STACK_MBEDTLS))
#if MYNEWT_VAL(SELFTEST)
/* Unit tests rely on custom RNG function not being set */
#define ble_sm_alg_rand NULL
#elif !(MYNEWT_VAL(BLE_CRYPTO_STACK_MBEDTLS))
/* used by uECC to get random data */
static int
ble_sm_alg_rand(uint8_t *dst, unsigned int size)
@@ -765,3 +769,4 @@ ble_sm_alg_ecc_init(void)
#endif
#endif
#endif