summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s23_srvr.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_srvr.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_srvr.c')
-rw-r--r--src/lib/libssl/s23_srvr.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/lib/libssl/s23_srvr.c b/src/lib/libssl/s23_srvr.c
index 35db7b4992..2aad21e93c 100644
--- a/src/lib/libssl/s23_srvr.c
+++ b/src/lib/libssl/s23_srvr.c
@@ -147,12 +147,10 @@ int
147ssl23_accept(SSL *s) 147ssl23_accept(SSL *s)
148{ 148{
149 BUF_MEM *buf; 149 BUF_MEM *buf;
150 unsigned long Time = (unsigned long)time(NULL);
151 void (*cb)(const SSL *ssl, int type, int val) = NULL; 150 void (*cb)(const SSL *ssl, int type, int val) = NULL;
152 int ret = -1; 151 int ret = -1;
153 int new_state, state; 152 int new_state, state;
154 153
155 RAND_add(&Time, sizeof(Time), 0);
156 ERR_clear_error(); 154 ERR_clear_error();
157 errno = 0; 155 errno = 0;
158 156