--- openssl/apps/pkcs12.c	2013-05-29 23:33:10.557945685 +0100
+++ openssl-new/apps/pkcs12.c	2013-05-29 23:13:32.579668109 +0100
@@ -173,12 +173,21 @@
 		else if (!strcmp(*args,"-camellia192")) enc=EVP_camellia_192_cbc();
 		else if (!strcmp(*args,"-camellia256")) enc=EVP_camellia_256_cbc();
 #endif
-		else if (!strcmp (*args, "-noiter")) iter = 1;
-		else if (!strcmp (*args, "-maciter"))
-					 maciter = PKCS12_DEFAULT_ITER;
-		else if (!strcmp (*args, "-nomaciter"))
-					 maciter = 1;
-		else if (!strcmp (*args, "-nomac"))
+		else if (!strcmp (*args, "-iter")) {
+			if (args[1]) {
+				if ((sscanf(*++args,"%d",&iter) == 0) || (iter < 1))
+					badarg = 1;
+			}
+			else
+                        badarg = 1;
+		} else if (!strcmp (*args, "-maciter")) {
+			if (args[1]) {
+				if ((sscanf(*++args,"%d",&maciter) == 0) || (maciter < 1))
+					badarg = 1;
+			}
+			else
+				badarg = 1;
+		} else if (!strcmp (*args, "-nomac"))
 					 maciter = -1;
 		else if (!strcmp (*args, "-macalg"))
 		    if (args[1]) {
@@ -311,9 +320,9 @@
 	BIO_printf (bio_err, "              encrypt PEM output with cbc camellia\n");
 #endif
 	BIO_printf (bio_err, "-nodes        don't encrypt private keys\n");
-	BIO_printf (bio_err, "-noiter       don't use encryption iteration\n");
+	BIO_printf (bio_err, "-iter num     perform key iteration num times\n");
 	BIO_printf (bio_err, "-nomaciter    don't use MAC iteration\n");
-	BIO_printf (bio_err, "-maciter      use MAC iteration\n");
+	BIO_printf (bio_err, "-maciter num  perform MAC iteration num times\n");
 	BIO_printf (bio_err, "-nomac        don't generate MAC\n");
 	BIO_printf (bio_err, "-twopass      separate MAC, encryption passwords\n");
 	BIO_printf (bio_err, "-descert      encrypt PKCS#12 certificates with triple DES (default RC2-40)\n");
