summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2005-03-22 14:11:06 +0000
committerDr. Stephen Henson <steve@openssl.org>2005-03-22 14:11:06 +0000
commit59b6836ab2cff27c9d7062699abcbf805350b8ad (patch)
treea2182e08b3a233a2e8819fafdd3828f48a43da6e /ssl
parent9fc9b55237d3f8abb0f0efb2bf26bc58bcd234bb (diff)
Ensure (SSL_RANDOM_BYTES - 4) of pseudo random data is used for server and
client random values.
Diffstat (limited to 'ssl')
-rw-r--r--ssl/s3_clnt.c2
-rw-r--r--ssl/s3_srvr.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c
index 56dbf75fe3..54598f0f8b 100644
--- a/ssl/s3_clnt.c
+++ b/ssl/s3_clnt.c
@@ -562,7 +562,7 @@ static int ssl3_client_hello(SSL *s)
p=s->s3->client_random;
Time=time(NULL); /* Time */
l2n(Time,p);
- RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time));
+ RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4);
/* Do the message type and length last */
d=p= &(buf[4]);
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
index 898f49810c..28b30fec23 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -996,7 +996,7 @@ static int ssl3_send_server_hello(SSL *s)
p=s->s3->server_random;
Time=time(NULL); /* Time */
l2n(Time,p);
- RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-sizeof(Time));
+ RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4);
/* Do the message type and length last */
d=p= &(buf[4]);