]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Make fipsinstall -out flag optional
authorRich Salz <rsalz@akamai.com>
Fri, 19 Mar 2021 16:05:59 +0000 (12:05 -0400)
committerRichard Levitte <levitte@openssl.org>
Wed, 24 Mar 2021 16:46:40 +0000 (17:46 +0100)
If -out is not specified, send output to stdout.
Fix documentation errors.
Remove "-out -" from an invocation.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14623)

apps/fipsinstall.c
doc/man1/openssl-fipsinstall.pod.in
providers/build.info

index e1279c32e931b9cbf04dd02b8d7e0f96f26e4caf..651df6250f200e3eecc2a2e9938d526d7850bfa4 100644 (file)
@@ -376,7 +376,7 @@ opthelp:
 
     /* No extra arguments. */
     argc = opt_num_rest();
-    if (argc != 0)
+    if (argc != 0 || (verify && in_fname == NULL))
         goto opthelp;
 
     if (parent_config != NULL) {
@@ -389,9 +389,7 @@ opthelp:
         }
         goto end;
     }
-    if (module_fname == NULL
-            || (verify && in_fname == NULL)
-            || (!verify && out_fname == NULL))
+    if (module_fname == NULL)
         goto opthelp;
 
     tail = opt_path_end(module_fname);
@@ -490,7 +488,9 @@ opthelp:
         if (!load_fips_prov_and_run_self_test(prov_name))
             goto end;
 
-        fout = bio_open_default(out_fname, 'w', FORMAT_TEXT);
+        fout =
+            out_fname == NULL ? dup_bio_out(FORMAT_TEXT)
+                              : bio_open_default(out_fname, 'w', FORMAT_TEXT);
         if (fout == NULL) {
             BIO_printf(bio_err, "Failed to open file\n");
             goto end;
index b57717f7da4f3a7fe56809966f58fab8a2e7fb61..b04164d4da502eac190d92cec4f4172ed15a2e74 100644 (file)
@@ -88,8 +88,8 @@ Filename to output the configuration data to; the default is standard output.
 
 =item B<-in> I<configfilename>
 
-Input filename to load configuration data from. Used with the B<-verify> option.
-Standard input is used if the filename is C<->.
+Input filename to load configuration data from.
+Must be used if the B<-verify> option is specified.
 
 =item B<-verify>
 
index 1fab34c28d1b0da20933e2eaf14b28d2390d3cb9..4296aa05a6b3f3554c6834d956d6abbe848a9226 100644 (file)
@@ -150,7 +150,7 @@ IF[{- !$disabled{fips} -}]
   DEPEND[|tests|]=fipsmodule.cnf
   GENERATE[fipsmodule.cnf]=../apps/openssl fipsinstall \
         -module providers/$(FIPSMODULENAME) -provider_name fips \
-        -mac_name HMAC -section_name fips_sect -out -
+        -mac_name HMAC -section_name fips_sect
   DEPEND[fipsmodule.cnf]=$FIPSGOAL
 ENDIF