diff options
| author | deraadt <> | 2014-04-14 17:45:38 +0000 |
|---|---|---|
| committer | deraadt <> | 2014-04-14 17:45:38 +0000 |
| commit | 67dc984dfef68b4f0fe3ddcf4b7e2481dd2c62b9 (patch) | |
| tree | 9a82fc040475abf4e516b4c99e34037b7ef267da /src/lib/libc | |
| parent | 20ca94a4292674751b6713ef6106d34384cef84c (diff) | |
| download | openbsd-67dc984dfef68b4f0fe3ddcf4b7e2481dd2c62b9.tar.gz openbsd-67dc984dfef68b4f0fe3ddcf4b7e2481dd2c62b9.tar.bz2 openbsd-67dc984dfef68b4f0fe3ddcf4b7e2481dd2c62b9.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 '')
| -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 | { |
