From: Nick Mathewson Date: Sun, 20 Oct 2013 22:08:58 +0000 (-0700) Subject: Fix another gmt_unix_time case in server_random X-Git-Tag: OpenSSL_1_0_1f~34 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=453ca706cc07ccdbe234af7ace890b026c7aea34;p=oweals%2Fopenssl.git Fix another gmt_unix_time case in server_random --- diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index e8c7e6d1f4..e5a8b3fbf2 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -1432,19 +1432,13 @@ int ssl3_send_server_hello(SSL *s) unsigned char *p,*d; int i,sl; unsigned long l; -#ifdef OPENSSL_NO_TLSEXT - unsigned long Time; -#endif if (s->state == SSL3_ST_SW_SRVR_HELLO_A) { buf=(unsigned char *)s->init_buf->data; #ifdef OPENSSL_NO_TLSEXT p=s->s3->server_random; - /* Generate server_random if it was not needed previously */ - Time=(unsigned long)time(NULL); /* Time */ - l2n(Time,p); - if (RAND_pseudo_bytes(p,SSL3_RANDOM_SIZE-4) <= 0) + if (ssl_fill_hello_random(s, 1, p, SSL3_RANDOM_SIZE) <= 0) return -1; #endif /* Do the message type and length last */