summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s23_clnt.c
diff options
context:
space:
mode:
authorderaadt <>2014-04-14 17:45:38 +0000
committerderaadt <>2014-04-14 17:45:38 +0000
commitfbbc137e481f092be7bdc3fedb505f5c2d89eba0 (patch)
tree9a82fc040475abf4e516b4c99e34037b7ef267da /src/lib/libssl/s23_clnt.c
parent64b5c0c827fdf0a319303f85f2a6cecdf997f204 (diff)
downloadopenbsd-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/s23_clnt.c')
-rw-r--r--src/lib/libssl/s23_clnt.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/lib/libssl/s23_clnt.c b/src/lib/libssl/s23_clnt.c
index 0fd388a05a..8ed79c3d55 100644
--- a/src/lib/libssl/s23_clnt.c
+++ b/src/lib/libssl/s23_clnt.c
@@ -145,12 +145,10 @@ int
145ssl23_connect(SSL *s) 145ssl23_connect(SSL *s)
146{ 146{
147 BUF_MEM *buf = NULL; 147 BUF_MEM *buf = NULL;
148 unsigned long Time = (unsigned long)time(NULL);
149 void (*cb)(const SSL *ssl, int type, int val) = NULL; 148 void (*cb)(const SSL *ssl, int type, int val) = NULL;
150 int ret = -1; 149 int ret = -1;
151 int new_state, state; 150 int new_state, state;
152 151
153 RAND_add(&Time, sizeof(Time), 0);
154 ERR_clear_error(); 152 ERR_clear_error();
155 errno = 0; 153 errno = 0;
156 154