summaryrefslogtreecommitdiffstats
path: root/apps/pkcs8.c
diff options
context:
space:
mode:
authorNaftuli Tzvi Kay <rfkroctk@gmail.com>2014-06-03 12:48:06 -0700
committerMatt Caswell <matt@openssl.org>2014-06-17 23:10:14 +0100
commit8a6c6bbf21cc11ea0fed69a106250af0d734d786 (patch)
tree13332acc4b6af40f43a313cf92dcdbf01a2aa4f7 /apps/pkcs8.c
parent50cc4f7b3d64621b6062ad1f16a7630b7c730d9b (diff)
Added custom PBKDF2 iteration count to PKCS8 tool.
Diffstat (limited to 'apps/pkcs8.c')
-rw-r--r--apps/pkcs8.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/pkcs8.c b/apps/pkcs8.c
index dc9e1ef66f..979723e89c 100644
--- a/apps/pkcs8.c
+++ b/apps/pkcs8.c
@@ -173,6 +173,12 @@ int MAIN(int argc, char **argv)
topk8 = 1;
else if (!strcmp (*args, "-noiter"))
iter = 1;
+ else if (!strcmp (*args, "-iter"))
+ {
+ if (!args[1]) goto bad;
+ iter = atoi(*(++args));
+ if (iter <= 0) goto bad;
+ }
else if (!strcmp (*args, "-nocrypt"))
nocrypt = 1;
else if (!strcmp (*args, "-nooct"))
@@ -235,7 +241,8 @@ int MAIN(int argc, char **argv)
BIO_printf(bio_err, "-nooct use (nonstandard) no octet format\n");
BIO_printf(bio_err, "-embed use (nonstandard) embedded DSA parameters format\n");
BIO_printf(bio_err, "-nsdb use (nonstandard) DSA Netscape DB format\n");
- BIO_printf(bio_err, "-noiter use 1 as iteration count\n");
+ BIO_printf(bio_err, "-iter count use count as iteration count\n");
+ BIO_printf(bio_err, "-noiter use 1 as iteration count\n");
BIO_printf(bio_err, "-nocrypt use or expect unencrypted private key\n");
BIO_printf(bio_err, "-v2 alg use PKCS#5 v2.0 and cipher \"alg\"\n");
BIO_printf(bio_err, "-v1 obj use PKCS#5 v1.5 and cipher \"alg\"\n");