aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLibravatar Ondřej Surý <ondrej@sury.org> 2016-08-30 10:29:57 +0200
committerLibravatarLibravatar Ondřej Surý <ondrej@sury.org> 2016-08-30 10:29:57 +0200
commit45dfa8916f911e55b60cb03c1cd0f6cea1141b63 (patch)
tree055e6e64a282d211a2d7fa39f7ca1c168141dd14
parent7d6202bfa85e8f0bf90590a9381757f15e296a33 (diff)
downloadluaossl-45dfa8916f911e55b60cb03c1cd0f6cea1141b63.tar.gz
luaossl-45dfa8916f911e55b60cb03c1cd0f6cea1141b63.tar.bz2
luaossl-45dfa8916f911e55b60cb03c1cd0f6cea1141b63.zip
Use RAND_seed() instead of RAND_add() where appropriate
-rw-r--r--src/openssl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openssl.c b/src/openssl.c
index 7c28c84..9fc4595 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -7844,7 +7844,7 @@ static int randL_stir(struct randL_state *st, unsigned rqstd) {
arc4random(data, n);
- RAND_add(data, n, n);
+ RAND_seed(data, n);
count += n;
}
@@ -7858,7 +7858,7 @@ static int randL_stir(struct randL_state *st, unsigned rqstd) {
break;
}
- RAND_add(data, n, n);
+ RAND_seed(data, n);
count += n;
}
@@ -7871,7 +7871,7 @@ static int randL_stir(struct randL_state *st, unsigned rqstd) {
if (0 != sysctl(mib, countof(mib), data, &n, (void *)0, 0))
break;
- RAND_add(data, n, n);
+ RAND_seed(data, n);
count += n;
}
@@ -7906,7 +7906,7 @@ static int randL_stir(struct randL_state *st, unsigned rqstd) {
goto error;
default:
- RAND_add(data, n, n);
+ RAND_seed(data, n);
count += n;
}