diff options
author | pjd <pjd@FreeBSD.org> | 2012-11-30 22:23:23 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2012-11-30 22:23:23 +0000 |
commit | ee39d48b3c13e2ae06a4291d4f7310665f3e88e7 (patch) | |
tree | 1d55aa2b80409aa89d8cebf07c431cfc0e72067b /crypto/openssl | |
parent | f33a5b80e4e9f8c830ba568dab085f88277ddd31 (diff) | |
download | FreeBSD-src-ee39d48b3c13e2ae06a4291d4f7310665f3e88e7.zip FreeBSD-src-ee39d48b3c13e2ae06a4291d4f7310665f3e88e7.tar.gz |
Allow OpenSSL to use arc4random(3) on FreeBSD. arc4random(3) was modified
some time ago to use sysctl instead of /dev/random to get random data,
so is now much better choice, especially for sandboxed processes that have
no direct access to /dev/random.
Approved by: benl
MFC after: 2 weeks
Diffstat (limited to 'crypto/openssl')
-rw-r--r-- | crypto/openssl/crypto/rand/rand_unix.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/openssl/crypto/rand/rand_unix.c b/crypto/openssl/crypto/rand/rand_unix.c index e3a6557..31322f6 100644 --- a/crypto/openssl/crypto/rand/rand_unix.c +++ b/crypto/openssl/crypto/rand/rand_unix.c @@ -216,7 +216,7 @@ int RAND_poll(void) } return 1; } -#elif defined __OpenBSD__ +#elif defined(__FreeBSD__) || defined(__OpenBSD__) int RAND_poll(void) { u_int32_t rnd = 0, i; @@ -233,7 +233,7 @@ int RAND_poll(void) return 1; } -#else /* !defined(__OpenBSD__) */ +#else /* !defined(__FreeBSD__) && !defined(__OpenBSD__) */ int RAND_poll(void) { unsigned long l; @@ -419,7 +419,7 @@ int RAND_poll(void) #endif } -#endif /* defined(__OpenBSD__) */ +#endif /* defined(__FreeBSD__) || defined(__OpenBSD__) */ #endif /* !(defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE)) */ |