summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s3_clnt.c
diff options
context:
space:
mode:
authorderaadt <>2014-06-07 22:23:12 +0000
committerderaadt <>2014-06-07 22:23:12 +0000
commitde48c77a08514ed654e05e710444452ffab6d0aa (patch)
tree974be678316c95805c95e61416f75191d5b20bbe /src/lib/libssl/s3_clnt.c
parentffcbdf8a3fda87b9b0d60403b8bda401683595e1 (diff)
downloadopenbsd-de48c77a08514ed654e05e710444452ffab6d0aa.tar.gz
openbsd-de48c77a08514ed654e05e710444452ffab6d0aa.tar.bz2
openbsd-de48c77a08514ed654e05e710444452ffab6d0aa.zip
http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=2016265dfbab162ec30718b5e7480add42598158
Don't know the full story, but it looks like a "can't do random perfectly, so do it god awful" problem was found in 2013, and replaced with "only do it badly if a flag is set". New flags (SSL_MODE_SEND_SERVERHELLO_TIME and SSL_MODE_SEND_SERVERHELLO_TIME) were added [Ben Laurie?] to support the old scheme of "use time_t for first 4 bytes of the random buffer". Nothing uses these flags [ecosystem scan by sthen] Fully discourage use of these flags in the future by removing support & definition of them. The buflen < 4 check is also interesting, because no entropy would be returned. No callers passed such small buffers. ok miod sthen
Diffstat (limited to 'src/lib/libssl/s3_clnt.c')
-rw-r--r--src/lib/libssl/s3_clnt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c
index f2c7dd2442..45dfb64f92 100644
--- a/src/lib/libssl/s3_clnt.c
+++ b/src/lib/libssl/s3_clnt.c
@@ -674,9 +674,7 @@ ssl3_client_hello(SSL *s)
674 /* else use the pre-loaded session */ 674 /* else use the pre-loaded session */
675 675
676 p = s->s3->client_random; 676 p = s->s3->client_random;
677 677 RAND_pseudo_bytes(p, SSL3_RANDOM_SIZE);
678 if (ssl_fill_hello_random(s, 0, p, SSL3_RANDOM_SIZE) <= 0)
679 goto err;
680 678
681 /* Do the message type and length last */ 679 /* Do the message type and length last */
682 d = p = &(buf[4]); 680 d = p = &(buf[4]);