aboutsummaryrefslogtreecommitdiff
path: root/apps/ecparam.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/ecparam.c
parentab14d2af5386897eba8307c9f3220a6d775c0898 (diff)
downloadopenssl-5388f9862d9aaf3c7cf7a70c1e36e7e983c26cfc.zip
openssl-5388f9862d9aaf3c7cf7a70c1e36e7e983c26cfc.tar.gz
openssl-5388f9862d9aaf3c7cf7a70c1e36e7e983c26cfc.tar.bz2
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/ecparam.c')
-rw-r--r--apps/ecparam.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/apps/ecparam.c b/apps/ecparam.c
index 6796af6..307eb1f 100644
--- a/apps/ecparam.c
+++ b/apps/ecparam.c
@@ -35,31 +35,38 @@ typedef enum OPTION_choice {
} OPTION_CHOICE;
const OPTIONS ecparam_options[] = {
+ OPT_SECTION("General"),
{"help", OPT_HELP, '-', "Display this summary"},
- {"inform", OPT_INFORM, 'F', "Input format - default PEM (DER or PEM)"},
- {"outform", OPT_OUTFORM, 'F', "Output format - default PEM"},
+ {"list_curves", OPT_LIST_CURVES, '-',
+ "Prints a list of all curve 'short names'"},
+# ifndef OPENSSL_NO_ENGINE
+ {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"},
+# endif
+
+ {"genkey", OPT_GENKEY, '-', "Generate ec key"},
{"in", OPT_IN, '<', "Input file - default stdin"},
+ {"inform", OPT_INFORM, 'F', "Input format - default PEM (DER or PEM)"},
{"out", OPT_OUT, '>', "Output file - default stdout"},
+ {"outform", OPT_OUTFORM, 'F', "Output format - default PEM"},
+
+ OPT_SECTION("Output"),
{"text", OPT_TEXT, '-', "Print the ec parameters in text form"},
{"C", OPT_C, '-', "Print a 'C' function creating the parameters"},
+ {"noout", OPT_NOOUT, '-', "Do not print the ec parameter"},
+ {"param_enc", OPT_PARAM_ENC, 's',
+ "Specifies the way the ec parameters are encoded"},
+
+ OPT_SECTION("Parameter"),
{"check", OPT_CHECK, '-', "Validate the ec parameters"},
{"check_named", OPT_CHECK_NAMED, '-',
"Check that named EC curve parameters have not been modified"},
- {"list_curves", OPT_LIST_CURVES, '-',
- "Prints a list of all curve 'short names'"},
{"no_seed", OPT_NO_SEED, '-',
"If 'explicit' parameters are chosen do not use the seed"},
- {"noout", OPT_NOOUT, '-', "Do not print the ec parameter"},
{"name", OPT_NAME, 's',
"Use the ec parameters with specified 'short name'"},
{"conv_form", OPT_CONV_FORM, 's', "Specifies the point conversion form "},
- {"param_enc", OPT_PARAM_ENC, 's',
- "Specifies the way the ec parameters are encoded"},
- {"genkey", OPT_GENKEY, '-', "Generate ec key"},
+
OPT_R_OPTIONS,
-# ifndef OPENSSL_NO_ENGINE
- {"engine", OPT_ENGINE, 's', "Use engine, possibly a hardware device"},
-# endif
{NULL}
};