Fix openssl passwd -1
[oweals/openssl.git] / apps / pkcs7.c
index f471cc77fda3c92e8e4802c6072db7afe666ddd7..0af269007ac71422d352330c80ff0d03ec6125d4 100644 (file)
@@ -196,7 +196,15 @@ bad:
                }
 
        if (outfile == NULL)
+               {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
+#ifdef VMS
+               {
+               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
+               out = BIO_push(tmpbio, out);
+               }
+#endif
+               }
        else
                {
                if (BIO_write_filename(out,outfile) <= 0)
@@ -280,6 +288,6 @@ bad:
 end:
        if (p7 != NULL) PKCS7_free(p7);
        if (in != NULL) BIO_free(in);
-       if (out != NULL) BIO_free(out);
+       if (out != NULL) BIO_free_all(out);
        EXIT(ret);
        }