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/libssl/s3_clnt.c | |
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/libssl/s3_clnt.c')
-rw-r--r-- | src/lib/libssl/s3_clnt.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c index b9ca6b6f9b..4ad8d3943e 100644 --- a/src/lib/libssl/s3_clnt.c +++ b/src/lib/libssl/s3_clnt.c | |||
@@ -186,12 +186,10 @@ int | |||
186 | ssl3_connect(SSL *s) | 186 | ssl3_connect(SSL *s) |
187 | { | 187 | { |
188 | BUF_MEM *buf = NULL; | 188 | BUF_MEM *buf = NULL; |
189 | unsigned long Time = (unsigned long)time(NULL); | ||
190 | void (*cb)(const SSL *ssl, int type, int val) = NULL; | 189 | void (*cb)(const SSL *ssl, int type, int val) = NULL; |
191 | int ret = -1; | 190 | int ret = -1; |
192 | int new_state, state, skip = 0; | 191 | int new_state, state, skip = 0; |
193 | 192 | ||
194 | RAND_add(&Time, sizeof(Time), 0); | ||
195 | ERR_clear_error(); | 193 | ERR_clear_error(); |
196 | errno = 0; | 194 | errno = 0; |
197 | 195 | ||