mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-05 04:23:41 +08:00
wpa_supplicant: Use arc4random instead of getentropy.
This commit is contained in:
parent
bc4bb2e9be
commit
9521c08d78
@ -26,7 +26,7 @@
|
|||||||
#endif /* __MACH__ */
|
#endif /* __MACH__ */
|
||||||
|
|
||||||
#ifdef __rtems__
|
#ifdef __rtems__
|
||||||
#include <unistd.h>
|
#include <stdlib.h>
|
||||||
#endif /* __rtems__ */
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
|
|
||||||
@ -288,7 +288,8 @@ int os_get_random(unsigned char *buf, size_t len)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
#ifdef __rtems__
|
#ifdef __rtems__
|
||||||
return getentropy(buf, len);
|
arc4random_buf(buf, len);
|
||||||
|
return 0;
|
||||||
#else /* __rtems__ */
|
#else /* __rtems__ */
|
||||||
f = fopen("/dev/urandom", "rb");
|
f = fopen("/dev/urandom", "rb");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user