Signal an error if the entered output password didn't match itself.
[oweals/openssl.git] / apps / pkcs8.c
index 912e32006b6c4d75ec66c6eb88932d1482237c54..8464c439967cc02fa43e2fc2171e286848d82b75 100644 (file)
@@ -63,7 +63,6 @@
 #include <openssl/evp.h>
 #include <openssl/pkcs12.h>
 
-#include "apps.h"
 #define PROG pkcs8_main
 
 int MAIN(int, char **);
@@ -245,7 +244,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,