--- openssl/apps/pkcs8.c	2013-02-11 15:26:04.000000000 +0000
+++ openssl-new/apps/pkcs8.c	2013-05-29 22:32:26.543087389 +0100
@@ -155,8 +155,17 @@
 			}
 		else if (!strcmp (*args, "-topk8"))
 			topk8 = 1;
-		else if (!strcmp (*args, "-noiter"))
-			iter = 1;
+		else if (!strcmp (*args, "-iter"))
+			{
+                        if (args[1])
+                                {
+                                args++;
+                                if ((sscanf(*args,"%d",&iter) == 0) || (iter < 0))
+                                        badarg = 1;
+                                }
+                        else
+                                badarg = 1;
+                        }
 		else if (!strcmp (*args, "-nocrypt"))
 			nocrypt = 1;
 		else if (!strcmp (*args, "-nooct"))
@@ -219,7 +228,7 @@
 		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           use specific 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");
