mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-10 06:44:32 +00:00
micro-ecc: add uECC_NO_DEFAULT_RNG to disable default RNG from OS (POSIX,
This commit is contained in:
parent
34bd46a03b
commit
bf2b6c3754
6
3rd-party/micro-ecc/uECC.c
vendored
6
3rd-party/micro-ecc/uECC.c
vendored
@ -405,7 +405,7 @@ static void vli_square(uECC_word_t *result, const uECC_word_t *left);
|
|||||||
static void vli_modSquare_fast(uECC_word_t *result, const uECC_word_t *left);
|
static void vli_modSquare_fast(uECC_word_t *result, const uECC_word_t *left);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(_WIN32) || defined(_WIN64))
|
#if ((defined(_WIN32) || defined(_WIN64)) && !defined(uECC_NO_DEFAULT_RNG))
|
||||||
/* Windows */
|
/* Windows */
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
@ -423,8 +423,8 @@ static int default_RNG(uint8_t *dest, unsigned size) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(unix) || defined(__linux__) || defined(__unix__) || defined(__unix) || \
|
#elif (defined(unix) || defined(__linux__) || defined(__unix__) || defined(__unix) || \
|
||||||
(defined(__APPLE__) && defined(__MACH__)) || defined(uECC_POSIX)
|
(defined(__APPLE__) && defined(__MACH__)) || defined(uECC_POSIX)) && !defined(uECC_NO_DEFAULT_RNG)
|
||||||
|
|
||||||
/* Some POSIX-like system with /dev/urandom or /dev/random. */
|
/* Some POSIX-like system with /dev/urandom or /dev/random. */
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user