Blame SOURCES/0022-fix-openssl-req-password.patch

2871ff
diff -up openssl-3.0.0-beta2/apps/req.c.req-password openssl-3.0.0-beta2/apps/req.c
2871ff
--- openssl-3.0.0-beta2/apps/req.c.req-password	2021-08-10 16:31:04.726233653 +0200
2871ff
+++ openssl-3.0.0-beta2/apps/req.c	2021-08-10 16:31:58.286947297 +0200
2871ff
@@ -686,7 +686,7 @@ int req_main(int argc, char **argv)
2871ff
         EVP_PKEY_CTX_free(genctx);
2871ff
         genctx = NULL;
2871ff
     }
2871ff
-    if (keyout == NULL) {
2871ff
+    if (keyout == NULL && keyfile == NULL) {
2871ff
         keyout = NCONF_get_string(req_conf, section, KEYFILE);
2871ff
         if (keyout == NULL)
2871ff
             ERR_clear_error();
2871ff
diff -up openssl-3.0.0-beta2/doc/man1/openssl-req.pod.in.req-password openssl-3.0.0-beta2/doc/man1/openssl-req.pod.in
2871ff
--- openssl-3.0.0-beta2/doc/man1/openssl-req.pod.in.req-password	2021-08-10 16:32:21.863261416 +0200
2871ff
+++ openssl-3.0.0-beta2/doc/man1/openssl-req.pod.in	2021-08-10 16:33:19.173025012 +0200
2871ff
@@ -205,11 +205,12 @@ See L<openssl-format-options(1)> for det
2871ff
 =item B<-keyout> I<filename>
2871ff
 
2871ff
 This gives the filename to write any private key to that has been newly created
2871ff
-or read from B<-key>.
2871ff
-If the B<-keyout> option is not given the filename specified in the
2871ff
-configuration file with the B<default_keyfile> option is used, if present.
2871ff
-If a new key is generated and no filename is specified
2871ff
-the key is written to standard output.
2871ff
+or read from B<-key>.  If neither the B<-keyout> option nor the B<-key> option
2871ff
+are given then the filename specified in the configuration file with the
2871ff
+B<default_keyfile> option is used, if present.  Thus, if you want to write the
2871ff
+private key and the B<-key> option is provided, you should provide the
2871ff
+B<-keyout> option explicitly.  If a new key is generated and no filename is
2871ff
+specified the key is written to standard output.
2871ff
 
2871ff
 =item B<-noenc>
2871ff