]> granicus.if.org Git - openssl/commitdiff
Fix another gmt_unix_time case in server_random
authorNick Mathewson <nickm@torproject.org>
Sun, 20 Oct 2013 22:08:58 +0000 (15:08 -0700)
committerBen Laurie <ben@links.org>
Mon, 21 Oct 2013 02:37:20 +0000 (03:37 +0100)
ssl/s3_srvr.c

index 92181bb4af001143e8cf61437426178671363c7c..bfd05242e8ca31a47a07582857a42cdab5070b3c 100644 (file)
@@ -1493,19 +1493,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 */