On VMS, stdout may very well lead to a file that is written to in a
[openssl.git] / apps / ciphers.c
index 72b2009e1874e70d33223bb836888e54e4ec8212..b6e2f966d86e78d7b01c097ea655fc4932920156 100644 (file)
@@ -108,6 +108,12 @@ int MAIN(int argc, char **argv)
        if (bio_err == NULL)
                bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
        STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
+#ifdef VMS
+       {
+       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
+       STDout = BIO_push(tmpbio, STDout);
+       }
+#endif
 
        argc--;
        argv++;
@@ -195,7 +201,7 @@ err:
 end:
        if (ctx != NULL) SSL_CTX_free(ctx);
        if (ssl != NULL) SSL_free(ssl);
-       if (STDout != NULL) BIO_free(STDout);
+       if (STDout != NULL) BIO_free_all(STDout);
        EXIT(ret);
        }