Fix openssl passwd -1
[oweals/openssl.git] / apps / dsa.c
index 842e0c0d15ae9ad292342b34f32a12368fc3b2d3..7c4a46f78eae21a7a9e22bcd6420697947bf941f 100644 (file)
@@ -233,7 +233,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)
@@ -281,7 +289,7 @@ bad:
                ret=0;
 end:
        if(in != NULL) BIO_free(in);
-       if(out != NULL) BIO_free(out);
+       if(out != NULL) BIO_free_all(out);
        if(dsa != NULL) DSA_free(dsa);
        if(passin) OPENSSL_free(passin);
        if(passout) OPENSSL_free(passout);