summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s3_clnt.c
diff options
context:
space:
mode:
authorderaadt <>2014-04-14 17:45:38 +0000
committerderaadt <>2014-04-14 17:45:38 +0000
commit67dc984dfef68b4f0fe3ddcf4b7e2481dd2c62b9 (patch)
tree9a82fc040475abf4e516b4c99e34037b7ef267da /src/lib/libssl/s3_clnt.c
parent20ca94a4292674751b6713ef6106d34384cef84c (diff)
downloadopenbsd-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 'src/lib/libssl/s3_clnt.c')
-rw-r--r--src/lib/libssl/s3_clnt.c2
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
186ssl3_connect(SSL *s) 186ssl3_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