Initialize num properly.
[openssl.git] / apps / pkcs8.c
index 43ff86d4f7221e50101669b01c7b9b4584f836d6..dc9e1ef66fc36d0004ef6194082f2f3680f79c4a 100644 (file)
@@ -135,6 +135,22 @@ int MAIN(int argc, char **argv)
                        else
                                badarg = 1;
                        }
+               else if (!strcmp(*args,"-v2prf"))
+                       {
+                       if (args[1])
+                               {
+                               args++;
+                               pbe_nid=OBJ_txt2nid(*args);
+                               if (!EVP_PBE_find(EVP_PBE_TYPE_PRF, pbe_nid, NULL, NULL, 0))
+                                       {
+                                       BIO_printf(bio_err,
+                                                "Unknown PRF algorithm %s\n", *args);
+                                       badarg = 1;
+                                       }
+                               }
+                       else
+                               badarg = 1;
+                       }
                else if (!strcmp(*args,"-inform"))
                        {
                        if (args[1])
@@ -275,7 +291,6 @@ int MAIN(int argc, char **argv)
                }
        if (topk8)
                {
-               BIO_free(in); /* Not needed in this section */
                pkey = load_key(bio_err, infile, informat, 1,
                        passin, e, "key");
                if (!pkey)
@@ -404,6 +419,10 @@ int MAIN(int argc, char **argv)
                        BIO_printf(bio_err, "DSA public key include in PrivateKey\n");
                        break;
 
+                       case PKCS8_NEG_PRIVKEY:
+                       BIO_printf(bio_err, "DSA private key value is negative\n");
+                       break;
+
                        default:
                        BIO_printf(bio_err, "Unknown broken type\n");
                        break;