diff options
| author | naddy <> | 2019-01-18 22:47:34 +0000 |
|---|---|---|
| committer | naddy <> | 2019-01-18 22:47:34 +0000 |
| commit | 91446375169ba9c7a6dfa5ce236ec4fa3ad1caba (patch) | |
| tree | 23c2aa154c1f32b233a93d1d5e9176072dd9eb6d | |
| parent | 5a590018a09c530517626327666bc31920645617 (diff) | |
| download | openbsd-91446375169ba9c7a6dfa5ce236ec4fa3ad1caba.tar.gz openbsd-91446375169ba9c7a6dfa5ce236ec4fa3ad1caba.tar.bz2 openbsd-91446375169ba9c7a6dfa5ce236ec4fa3ad1caba.zip | |
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 jmc@
| -rw-r--r-- | src/usr.bin/openssl/enc.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/usr.bin/openssl/enc.c b/src/usr.bin/openssl/enc.c index 4ba6625204..7daeafe9d7 100644 --- a/src/usr.bin/openssl/enc.c +++ b/src/usr.bin/openssl/enc.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: enc.c,v 1.15 2019/01/18 03:45:47 beck Exp $ */ | 1 | /* $OpenBSD: enc.c,v 1.16 2019/01/18 22:47:34 naddy Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -178,6 +178,13 @@ static struct option enc_options[] = { | |||
| 178 | .opt.arg = &enc_config.inf, | 178 | .opt.arg = &enc_config.inf, |
| 179 | }, | 179 | }, |
| 180 | { | 180 | { |
| 181 | .name = "iter", | ||
| 182 | .argname = "iterations", | ||
| 183 | .desc = "Specify iteration count and force use of PBKDF2", | ||
| 184 | .type = OPTION_VALUE, | ||
| 185 | .opt.value = &enc_config.iter, | ||
| 186 | }, | ||
| 187 | { | ||
| 181 | .name = "iv", | 188 | .name = "iv", |
| 182 | .argname = "IV", | 189 | .argname = "IV", |
| 183 | .desc = "IV to use, specified as a hexadecimal string", | 190 | .desc = "IV to use, specified as a hexadecimal string", |
| @@ -256,6 +263,12 @@ static struct option enc_options[] = { | |||
| 256 | .opt.arg = &enc_config.passarg, | 263 | .opt.arg = &enc_config.passarg, |
| 257 | }, | 264 | }, |
| 258 | { | 265 | { |
| 266 | .name = "pbkdf2", | ||
| 267 | .desc = "Use the pbkdf2 key derivation function", | ||
| 268 | .type = OPTION_FLAG, | ||
| 269 | .opt.flag = &enc_config.pbkdf2, | ||
| 270 | }, | ||
| 271 | { | ||
| 259 | .name = "S", | 272 | .name = "S", |
| 260 | .argname = "salt", | 273 | .argname = "salt", |
| 261 | .desc = "Salt to use, specified as a hexadecimal string", | 274 | .desc = "Salt to use, specified as a hexadecimal string", |
| @@ -275,18 +288,6 @@ static struct option enc_options[] = { | |||
| 275 | .type = OPTION_FLAG, | 288 | .type = OPTION_FLAG, |
| 276 | .opt.flag = &enc_config.verbose, | 289 | .opt.flag = &enc_config.verbose, |
| 277 | }, | 290 | }, |
| 278 | { | ||
| 279 | .name = "iter", | ||
| 280 | .desc = "Specify iteration count and force use of PBKDF2", | ||
| 281 | .type = OPTION_VALUE, | ||
| 282 | .opt.value = &enc_config.iter, | ||
| 283 | }, | ||
| 284 | { | ||
| 285 | .name = "pbkdf2", | ||
| 286 | .desc = "Use the pbkdf2 key derivation function", | ||
| 287 | .type = OPTION_FLAG, | ||
| 288 | .opt.flag = &enc_config.pbkdf2, | ||
| 289 | }, | ||
| 290 | #ifdef ZLIB | 291 | #ifdef ZLIB |
| 291 | { | 292 | { |
| 292 | .name = "z", | 293 | .name = "z", |
| @@ -319,9 +320,10 @@ enc_usage(void) | |||
| 319 | { | 320 | { |
| 320 | fprintf(stderr, "usage: enc -ciphername [-AadePp] [-base64] " | 321 | fprintf(stderr, "usage: enc -ciphername [-AadePp] [-base64] " |
| 321 | "[-bufsize number] [-debug]\n" | 322 | "[-bufsize number] [-debug]\n" |
| 322 | " [-in file] [-iv IV] [-K key] [-k password]\n" | 323 | " [-in file] [-iter iterations] [-iv IV] [-K key] " |
| 324 | "[-k password]\n" | ||
| 323 | " [-kfile file] [-md digest] [-none] [-nopad] [-nosalt]\n" | 325 | " [-kfile file] [-md digest] [-none] [-nopad] [-nosalt]\n" |
| 324 | " [-out file] [-pass arg] [-S salt] [-salt]\n\n"); | 326 | " [-out file] [-pass source] [-pbkdf2] [-S salt] [-salt]\n\n"); |
| 325 | options_usage(enc_options); | 327 | options_usage(enc_options); |
| 326 | fprintf(stderr, "\n"); | 328 | fprintf(stderr, "\n"); |
| 327 | 329 | ||
