More code for X509_print_ex() support.
[openssl.git] / apps / gendh.c
index caf5e8d736bd69545dc41b1e49d85a6d8f12acd9..e0c7889a31e119a680f16cc112cdb071245bbf6c 100644 (file)
@@ -142,7 +142,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)
@@ -174,7 +182,7 @@ bad:
 end:
        if (ret != 0)
                ERR_print_errors(bio_err);
-       if (out != NULL) BIO_free(out);
+       if (out != NULL) BIO_free_all(out);
        if (dh != NULL) DH_free(dh);
        EXIT(ret);
        }