diff options
author | Rich Salz <rsalz@akamai.com> | 2021-03-19 12:05:59 -0400 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-03-24 17:46:40 +0100 |
commit | eb78f9552307248ca5ccfc28d61faa823dae7c7e (patch) | |
tree | 631594198995778285b1edb365e35e78e5a5b317 /apps | |
parent | b238e78fe897dd22400e0353a9f43318397c2f98 (diff) | |
download | openssl-eb78f9552307248ca5ccfc28d61faa823dae7c7e.zip openssl-eb78f9552307248ca5ccfc28d61faa823dae7c7e.tar.gz openssl-eb78f9552307248ca5ccfc28d61faa823dae7c7e.tar.bz2 |
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@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14623)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/fipsinstall.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/fipsinstall.c b/apps/fipsinstall.c index e1279c3..651df62 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; |