Signal an error if the entered output password didn't match itself.
authorRichard Levitte <levitte@openssl.org>
Wed, 23 Oct 2002 15:07:13 +0000 (15:07 +0000)
committerRichard Levitte <levitte@openssl.org>
Wed, 23 Oct 2002 15:07:13 +0000 (15:07 +0000)
PR: 314

apps/pkcs8.c

index 7b588e43370763968d6f5d06f7a942a12e6a4591..926af8675fd0b3e99e2cabacafed38fc4d81d344 100644 (file)
@@ -236,7 +236,8 @@ int MAIN(int argc, char **argv)
                        if(passout) p8pass = passout;
                        else {
                                p8pass = pass;
-                               EVP_read_pw_string(pass, 50, "Enter Encryption Password:", 1);
+                               if (EVP_read_pw_string(pass, 50, "Enter Encryption Password:", 1))
+                                       return (1);
                        }
                        app_RAND_load_file(NULL, bio_err, 0);
                        if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,