Make the handling of output and input formats consistent
[openssl.git] / apps / pkcs8.c
index b120b93aa9c3da7adb8b4e9571e6e37f13fd78d2..e3cb7750e1ae11ab1b0eac12673d153701c784c4 100644 (file)
@@ -239,10 +239,10 @@ int pkcs8_main(int argc, char **argv)
     if ((pbe_nid == -1) && !cipher)
         pbe_nid = NID_pbeWithMD5AndDES_CBC;
 
-    in = bio_open_default(infile, "rb");
+    in = bio_open_default(infile, RB(informat));
     if (in == NULL)
         goto end;
-    out = bio_open_owner(outfile, "wb", private);
+    out = bio_open_owner(outfile, WB(outformat), private);
     if (out == NULL)
         goto end;