openssl -iter does not parse iterations (patch included)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

openssl -iter does not parse iterations (patch included)

Steven Roberts-4
>Synopsis: openssl -iter does not parse iterations
>Category: user
>Environment:
        System      : OpenBSD 6.5
        Details     : OpenBSD 6.5-beta (GENERIC.MP) #836: Tue Mar 26 23:10:49 MDT 2019
                         [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

        Architecture: OpenBSD.amd64
        Machine     : amd64
>Description:
        openssl -iter does not parse iterations
>How-To-Repeat:
        $ openssl chacha -P -nosalt -pass pass:foo -iter 80000
>Fix:

Make -iter work with iterations.

Index: usr.bin/openssl/enc.c
===================================================================
RCS file: /cvs/src/usr.bin/openssl/enc.c,v
retrieving revision 1.18
diff -u -p -r1.18 enc.c
--- usr.bin/openssl/enc.c 9 Feb 2019 15:49:21 -0000 1.18
+++ usr.bin/openssl/enc.c 1 Apr 2019 01:33:26 -0000
@@ -180,7 +180,7 @@ static struct option enc_options[] = {
  .name = "iter",
  .argname = "iterations",
  .desc = "Specify iteration count and force use of PBKDF2",
- .type = OPTION_VALUE,
+ .type = OPTION_ARG_INT,
  .opt.value = &enc_config.iter,
  },
  {