mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-15 06:27:55 +00:00
nimble: Copied ble_sm_alg.c from v5.2-rc1
This commit is contained in:
committed by
Kewal M. Shah
parent
eeb9c84dc0
commit
c691e80043
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user