summaryrefslogtreecommitdiffstats
path: root/apps/dhparam.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2019-11-08 06:08:30 +1000
committerPauli <paul.dale@oracle.com>2019-11-08 06:08:30 +1000
commit5388f9862d9aaf3c7cf7a70c1e36e7e983c26cfc (patch)
treebda368ec4d8855ac5d3e2a31648769a5dabfaac9 /apps/dhparam.c
parentab14d2af5386897eba8307c9f3220a6d775c0898 (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/dhparam.c')
-rw-r--r--apps/dhparam.c28
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}
};