From: Richard Levitte <levitte@openssl.org>
Date: Thu, 22 Jun 2000 21:16:01 +0000 (+0000)
Subject: Change req so the new parameter '-rand file' uses the given file in
X-Git-Tag: OpenSSL-engine-0_9_6-beta1~21^2~29
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff4e9d91d94d8065e70ba5e6760346b33bba9654;p=openssl

Change req so the new parameter '-rand file' uses the given file in
addition to the file given through the RANDFILE option or environment
variable.
---

diff --git a/apps/req.c b/apps/req.c
index b9b19b8312..4b9c3a1ed8 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -552,13 +552,10 @@ bad:
 
 	if (newreq && (pkey == NULL))
 		{
-		char *randfile;
-
-		if (inrand)
-			randfile = inrand;
-		else
-			randfile = CONF_get_string(req_conf,SECTION,"RANDFILE");
+		char *randfile = CONF_get_string(req_conf,SECTION,"RANDFILE");
 		app_RAND_load_file(randfile, bio_err, 0);
+		if (inrand)
+			app_RAND_load_files(inrand);
 	
 		if (newkey <= 0)
 			{