Make req seed the PRNG if signing with
[openssl.git] / apps / req.c
index fd26ed8343443560eca87fb044d5abaf7a683b2d..6a225bb4316454f6166f84d255ee7814013a165a 100644 (file)
@@ -547,6 +547,11 @@ bad:
                        BIO_printf(bio_err,"unable to load Private key\n");
                        goto end;
                        }
+                if (EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA)
+                       {
+                       char *randfile = CONF_get_string(req_conf,SECTION,"RANDFILE");
+                       app_RAND_load_file(randfile, bio_err, 0);
+                       }
                }
 
        if (newreq && (pkey == NULL))