Enable PSK in FIPS mode.
[oweals/openssl.git] / ssl / s3_srvr.c
index 508239fce5276c67c79aa0b4f0113674b17afa7e..e5a8b3fbf27ad171468a2680fd7929502f04c2b4 100644 (file)
@@ -1195,7 +1195,7 @@ int ssl3_get_client_hello(SSL *s)
        {
                unsigned char *pos;
                pos=s->s3->server_random;
-               if (ssl_fill_hello_random(s,1,pos,SSL3_RANDOM_SIZE) <= 0)
+               if (ssl_fill_hello_random(s, 1, pos, SSL3_RANDOM_SIZE) <= 0)
                        {
                        al=SSL_AD_INTERNAL_ERROR;
                        goto f_err;
@@ -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 */