diff options
author | deraadt <> | 2014-04-14 17:45:38 +0000 |
---|---|---|
committer | deraadt <> | 2014-04-14 17:45:38 +0000 |
commit | fbbc137e481f092be7bdc3fedb505f5c2d89eba0 (patch) | |
tree | 9a82fc040475abf4e516b4c99e34037b7ef267da /src/lib/libcrypto | |
parent | 64b5c0c827fdf0a319303f85f2a6cecdf997f204 (diff) | |
download | openbsd-fbbc137e481f092be7bdc3fedb505f5c2d89eba0.tar.gz openbsd-fbbc137e481f092be7bdc3fedb505f5c2d89eba0.tar.bz2 openbsd-fbbc137e481f092be7bdc3fedb505f5c2d89eba0.zip |
So the OpenSSL codebase does "get the time, add it as a random seed"
in a bunch of places inside the TLS engine, to try to keep entropy high.
I wonder if their moto is "If you can't solve a problem, at least try
to do it badly".
ok miod
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r-- | src/lib/libcrypto/bn/bn_rand.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bn/bn_rand.c b/src/lib/libcrypto/bn/bn_rand.c index b376c28ff3..5cbb1f33c1 100644 --- a/src/lib/libcrypto/bn/bn_rand.c +++ b/src/lib/libcrypto/bn/bn_rand.c | |||
@@ -119,7 +119,6 @@ static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom) | |||
119 | { | 119 | { |
120 | unsigned char *buf=NULL; | 120 | unsigned char *buf=NULL; |
121 | int ret=0,bit,bytes,mask; | 121 | int ret=0,bit,bytes,mask; |
122 | time_t tim; | ||
123 | 122 | ||
124 | if (bits == 0) | 123 | if (bits == 0) |
125 | { | 124 | { |
@@ -139,8 +138,6 @@ static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom) | |||
139 | } | 138 | } |
140 | 139 | ||
141 | /* make a random number and set the top and bottom bits */ | 140 | /* make a random number and set the top and bottom bits */ |
142 | time(&tim); | ||
143 | RAND_add(&tim,sizeof(tim),0.0); | ||
144 | 141 | ||
145 | if (pseudorand) | 142 | if (pseudorand) |
146 | { | 143 | { |