[openssl] master update

Richard Levitte levitte at openssl.org
Wed Mar 24 16:47:23 UTC 2021


The branch master has been updated
       via  eb78f9552307248ca5ccfc28d61faa823dae7c7e (commit)
      from  b238e78fe897dd22400e0353a9f43318397c2f98 (commit)


- Log -----------------------------------------------------------------
commit eb78f9552307248ca5ccfc28d61faa823dae7c7e
Author: Rich Salz <rsalz at akamai.com>
Date:   Fri Mar 19 12:05:59 2021 -0400

    Make fipsinstall -out flag optional
    
    If -out is not specified, send output to stdout.
    Fix documentation errors.
    Remove "-out -" from an invocation.
    
    Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14623)

-----------------------------------------------------------------------

Summary of changes:
 apps/fipsinstall.c                  | 10 +++++-----
 doc/man1/openssl-fipsinstall.pod.in |  4 ++--
 providers/build.info                |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/apps/fipsinstall.c b/apps/fipsinstall.c
index e1279c32e9..651df6250f 100644
--- a/apps/fipsinstall.c
+++ b/apps/fipsinstall.c
@@ -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;
diff --git a/doc/man1/openssl-fipsinstall.pod.in b/doc/man1/openssl-fipsinstall.pod.in
index b57717f7da..b04164d4da 100644
--- a/doc/man1/openssl-fipsinstall.pod.in
+++ b/doc/man1/openssl-fipsinstall.pod.in
@@ -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>
 
diff --git a/providers/build.info b/providers/build.info
index 1fab34c28d..4296aa05a6 100644
--- a/providers/build.info
+++ b/providers/build.info
@@ -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
 


More information about the openssl-commits mailing list