diff options
author | Rich Salz <rsalz@akamai.com> | 2019-11-08 06:08:30 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-11-08 06:08:30 +1000 |
commit | 5388f9862d9aaf3c7cf7a70c1e36e7e983c26cfc (patch) | |
tree | bda368ec4d8855ac5d3e2a31648769a5dabfaac9 /apps/pkey.c | |
parent | ab14d2af5386897eba8307c9f3220a6d775c0898 (diff) |
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/pkey.c')
-rw-r--r-- | apps/pkey.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/apps/pkey.c b/apps/pkey.c index 0806b4e045..6100f8dcd3 100644 --- a/apps/pkey.c +++ b/apps/pkey.c @@ -23,27 +23,33 @@ typedef enum OPTION_choice { } OPTION_CHOICE; const OPTIONS pkey_options[] = { + OPT_SECTION("General"), {"help", OPT_HELP, '-', "Display this summary"}, +#ifndef OPENSSL_NO_ENGINE + {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, +#endif + {"check", OPT_CHECK, '-', "Check key consistency"}, + {"pubcheck", OPT_PUB_CHECK, '-', "Check public key consistency"}, + {"", OPT_MD, '-', "Any supported cipher"}, + + OPT_SECTION("Input"), + {"in", OPT_IN, 's', "Input key"}, {"inform", OPT_INFORM, 'f', "Input format (DER or PEM)"}, - {"outform", OPT_OUTFORM, 'F', "Output format (DER or PEM)"}, {"passin", OPT_PASSIN, 's', "Input file pass phrase source"}, - {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, - {"in", OPT_IN, 's', "Input key"}, - {"out", OPT_OUT, '>', "Output file"}, {"pubin", OPT_PUBIN, '-', "Read public key from input (default is private key)"}, + {"traditional", OPT_TRADITIONAL, '-', + "Use traditional format for private keys"}, + + OPT_SECTION("Output"), + {"outform", OPT_OUTFORM, 'F', "Output format (DER or PEM)"}, + {"passout", OPT_PASSOUT, 's', "Output file pass phrase source"}, + {"out", OPT_OUT, '>', "Output file"}, {"pubout", OPT_PUBOUT, '-', "Output public key, not private"}, {"text_pub", OPT_TEXT_PUB, '-', "Only output public key components"}, {"text", OPT_TEXT, '-', "Output in plaintext as well"}, {"noout", OPT_NOOUT, '-', "Don't output the key"}, - {"", OPT_MD, '-', "Any supported cipher"}, - {"traditional", OPT_TRADITIONAL, '-', - "Use traditional format for private keys"}, -#ifndef OPENSSL_NO_ENGINE - {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"}, -#endif - {"check", OPT_CHECK, '-', "Check key consistency"}, - {"pubcheck", OPT_PUB_CHECK, '-', "Check public key consistency"}, + {NULL} }; |