diff options
author | William Ahern <william@25thandclement.com> | 2016-10-19 13:48:01 -0700 |
---|---|---|
committer | William Ahern <william@25thandclement.com> | 2016-10-19 13:48:01 -0700 |
commit | b2c70855a7b05f207f38f4bdd58fe6600bef9ec9 (patch) | |
tree | 8953324832f2a6178155887c117e3734ca1760b8 /src | |
parent | 6e9ce5c2b3adfc52030815c43439f4890f31c32c (diff) | |
download | luaossl-b2c70855a7b05f207f38f4bdd58fe6600bef9ec9.tar.gz luaossl-b2c70855a7b05f207f38f4bdd58fe6600bef9ec9.tar.bz2 luaossl-b2c70855a7b05f207f38f4bdd58fe6600bef9ec9.zip |
unbreak BSDs by using arc4random_buf
Diffstat (limited to 'src')
-rw-r--r-- | src/openssl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openssl.c b/src/openssl.c index 78dbd65..88561aa 100644 --- a/src/openssl.c +++ b/src/openssl.c | |||
@@ -7824,11 +7824,11 @@ static int randL_stir(struct randL_state *st, unsigned rqstd) { | |||
7824 | int error; | 7824 | int error; |
7825 | unsigned char data[256]; | 7825 | unsigned char data[256]; |
7826 | 7826 | ||
7827 | #if HAVE_ARC4RANDOM | 7827 | #if HAVE_ARC4RANDOM_BUF |
7828 | while (count < rqstd) { | 7828 | while (count < rqstd) { |
7829 | size_t n = MIN(rqstd - count, sizeof data); | 7829 | size_t n = MIN(rqstd - count, sizeof data); |
7830 | 7830 | ||
7831 | arc4random(data, n); | 7831 | arc4random_buf(data, n); |
7832 | 7832 | ||
7833 | RAND_seed(data, n); | 7833 | RAND_seed(data, n); |
7834 | 7834 | ||