summaryrefslogtreecommitdiffstats
path: root/apps/pkcs12.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/pkcs12.c')
-rw-r--r--apps/pkcs12.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/pkcs12.c b/apps/pkcs12.c
index 070993de30..6789169bdb 100644
--- a/apps/pkcs12.c
+++ b/apps/pkcs12.c
@@ -350,8 +350,15 @@ int MAIN(int argc, char **argv)
CRYPTO_push_info("write files");
#endif
- if (!outfile) out = BIO_new_fp(stdout, BIO_NOCLOSE);
- else out = BIO_new_file(outfile, "wb");
+ if (!outfile) {
+ out = BIO_new_fp(stdout, BIO_NOCLOSE);
+#ifdef VMS
+ {
+ BIO *tmpbio = BIO_new(BIO_f_linebuffer());
+ out = BIO_push(tmpbio, out);
+ }
+#endif
+ } else out = BIO_new_file(outfile, "wb");
if (!out) {
BIO_printf(bio_err, "Error opening output file %s\n",
outfile ? outfile : "<stdout>");
@@ -657,7 +664,7 @@ int MAIN(int argc, char **argv)
CRYPTO_remove_all_info();
#endif
BIO_free(in);
- BIO_free(out);
+ BIO_free_all(out);
if (canames) sk_free(canames);
if(passin) OPENSSL_free(passin);
if(passout) OPENSSL_free(passout);