diff options
author | Rich Salz <rsalz@akamai.com> | 2019-11-07 21:08:30 +0100 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-11-07 21:08:30 +0100 |
commit | 5388f9862d9aaf3c7cf7a70c1e36e7e983c26cfc (patch) | |
tree | bda368ec4d8855ac5d3e2a31648769a5dabfaac9 /apps/dhparam.c | |
parent | Add a test for EVP_PKEY_keymake() and EVP_PKEY_make() (diff) | |
download | openssl-5388f9862d9aaf3c7cf7a70c1e36e7e983c26cfc.tar.xz openssl-5388f9862d9aaf3c7cf7a70c1e36e7e983c26cfc.zip |
Add "sections" to -help output
Remove "Valid options" label, since all commands have sections (and
[almost] always the first one is "General options").
Have "list --options" ignore section headers
Reformat ts's additional help
Add output section
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9953)
Diffstat (limited to 'apps/dhparam.c')
-rw-r--r-- | apps/dhparam.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/apps/dhparam.c b/apps/dhparam.c index 7cd69b9270..74758a5dee 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -43,27 +43,33 @@ typedef enum OPTION_choice { const OPTIONS dhparam_options[] = { {OPT_HELP_STR, 1, '-', "Usage: %s [flags] [numbits]\n"}, - {OPT_HELP_STR, 1, '-', "Valid options are:\n"}, + + OPT_SECTION("General"), {"help", OPT_HELP, '-', "Display this summary"}, + {"check", OPT_CHECK, '-', "Check the DH parameters"}, +# ifndef OPENSSL_NO_DSA + {"dsaparam", OPT_DSAPARAM, '-', + "Read or generate DSA parameters, convert to DH"}, +# endif +# ifndef OPENSSL_NO_ENGINE + {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, +# endif + + OPT_SECTION("Input"), {"in", OPT_IN, '<', "Input file"}, {"inform", OPT_INFORM, 'F', "Input format, DER or PEM"}, - {"outform", OPT_OUTFORM, 'F', "Output format, DER or PEM"}, + + OPT_SECTION("Output"), {"out", OPT_OUT, '>', "Output file"}, - {"check", OPT_CHECK, '-', "Check the DH parameters"}, + {"outform", OPT_OUTFORM, 'F', "Output format, DER or PEM"}, {"text", OPT_TEXT, '-', "Print a text form of the DH parameters"}, {"noout", OPT_NOOUT, '-', "Don't output any DH parameters"}, - OPT_R_OPTIONS, {"C", OPT_C, '-', "Print C code"}, {"2", OPT_2, '-', "Generate parameters using 2 as the generator value"}, {"3", OPT_3, '-', "Generate parameters using 3 as the generator value"}, {"5", OPT_5, '-', "Generate parameters using 5 as the generator value"}, -# ifndef OPENSSL_NO_DSA - {"dsaparam", OPT_DSAPARAM, '-', - "Read or generate DSA parameters, convert to DH"}, -# endif -# ifndef OPENSSL_NO_ENGINE - {"engine", OPT_ENGINE, 's', "Use engine e, possibly a hardware device"}, -# endif + + OPT_R_OPTIONS, {NULL} }; |