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
commit67dc984dfef68b4f0fe3ddcf4b7e2481dd2c62b9 (patch)
tree9a82fc040475abf4e516b4c99e34037b7ef267da /src/lib/libssl/s23_srvr.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/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