summaryrefslogtreecommitdiffstats
path: root/freebsd
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2017-11-09 14:35:13 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-10 14:13:19 +0100
commit9521c08d7893b72d7b5b196cf322203a433ff7c7 (patch)
tree657ec76dd86245adc3373edc6e38d5442c197675 /freebsd
parentUpdate wpa_supplicant/hostapd for 2017-01 vulnerability release. (diff)
downloadrtems-libbsd-9521c08d7893b72d7b5b196cf322203a433ff7c7.tar.bz2
wpa_supplicant: Use arc4random instead of getentropy.
Diffstat (limited to 'freebsd')
-rw-r--r--freebsd/contrib/wpa/src/utils/os_unix.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/freebsd/contrib/wpa/src/utils/os_unix.c b/freebsd/contrib/wpa/src/utils/os_unix.c
index 7f101d71..1c960e51 100644
--- a/freebsd/contrib/wpa/src/utils/os_unix.c
+++ b/freebsd/contrib/wpa/src/utils/os_unix.c
@@ -26,7 +26,7 @@
#endif /* __MACH__ */
#ifdef __rtems__
-#include <unistd.h>
+#include <stdlib.h>
#endif /* __rtems__ */
@@ -288,7 +288,8 @@ int os_get_random(unsigned char *buf, size_t len)
return -1;
#ifdef __rtems__
- return getentropy(buf, len);
+ arc4random_buf(buf, len);
+ return 0;
#else /* __rtems__ */
f = fopen("/dev/urandom", "rb");
if (f == NULL) {