Add -iter and -pbkdf2 to the usage synopsis.
Reorder option descriptions so -iter and -pbkdf2 show up alphabetically.
Add missing argument name for -iter.

ok?

Index: enc.c
===================================================================
RCS file: /cvs/src/usr.bin/openssl/enc.c,v
retrieving revision 1.15
diff -u -p -r1.15 enc.c
--- enc.c       18 Jan 2019 03:45:47 -0000      1.15
+++ enc.c       18 Jan 2019 21:33:56 -0000
@@ -178,6 +178,13 @@ static struct option enc_options[] = {
                .opt.arg = &enc_config.inf,
        },
        {
+               .name = "iter",
+               .argname = "iterations",
+               .desc = "Specify iteration count and force use of PBKDF2",
+               .type = OPTION_VALUE,
+               .opt.value = &enc_config.iter,
+       },
+       {
                .name = "iv",
                .argname = "IV",
                .desc = "IV to use, specified as a hexadecimal string",
@@ -256,6 +263,12 @@ static struct option enc_options[] = {
                .opt.arg = &enc_config.passarg,
        },
        {
+               .name = "pbkdf2",
+               .desc = "Use the pbkdf2 key derivation function",
+               .type = OPTION_FLAG,
+               .opt.flag = &enc_config.pbkdf2,
+       },
+       {
                .name = "S",
                .argname = "salt",
                .desc = "Salt to use, specified as a hexadecimal string",
@@ -275,18 +288,6 @@ static struct option enc_options[] = {
                .type = OPTION_FLAG,
                .opt.flag = &enc_config.verbose,
        },
-       {
-               .name = "iter",
-               .desc = "Specify iteration count and force use of PBKDF2",
-               .type = OPTION_VALUE,
-               .opt.value = &enc_config.iter,
-       },
-       {
-               .name = "pbkdf2",
-               .desc = "Use the pbkdf2 key derivation function",
-               .type = OPTION_FLAG,
-               .opt.flag = &enc_config.pbkdf2,
-       },
 #ifdef ZLIB
        {
                .name = "z",
@@ -319,9 +320,10 @@ enc_usage(void)
 {
        fprintf(stderr, "usage: enc -ciphername [-AadePp] [-base64] "
            "[-bufsize number] [-debug]\n"
-           "    [-in file] [-iv IV] [-K key] [-k password]\n"
+           "    [-in file] [-iter iterations] [-iv IV] [-K key] "
+            "[-k password]\n"
            "    [-kfile file] [-md digest] [-none] [-nopad] [-nosalt]\n"
-           "    [-out file] [-pass arg] [-S salt] [-salt]\n\n");
+           "    [-out file] [-pass source] [-pbkdf2] [-S salt] [-salt]\n\n");
        options_usage(enc_options);
        fprintf(stderr, "\n");
 
-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to