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

apps/pkcs8.c

index f86474dd2516868c9e423e28bfa3130e920fa642..8464c439967cc02fa43e2fc2171e286848d82b75 100644 (file)
@@ -244,7 +244,8 @@ int MAIN(int argc, char **argv)
                        if(passout) p8pass = passout;
                        else {
                                p8pass = pass;
                        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,
                        }
                        app_RAND_load_file(NULL, bio_err, 0);
                        if (!(p8 = PKCS8_encrypt(pbe_nid, cipher,