[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Mon Mar 21 17:46:59 UTC 2016


The branch master has been updated
       via  149bd5d6cb3936480e64549902f058153eaf840b (commit)
      from  367071f121d7e941846f612fba60dbb1d12cf9dd (commit)


- Log -----------------------------------------------------------------
commit 149bd5d6cb3936480e64549902f058153eaf840b
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Mar 21 18:30:30 2016 +0100

    Just like bio_out, bio_err needs the linebuffer filter on VMS
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 apps/apps.c    | 11 +++++++++++
 apps/apps.h    |  1 +
 apps/openssl.c |  2 +-
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/apps/apps.c b/apps/apps.c
index b430742..128f387 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -2486,6 +2486,17 @@ BIO *dup_bio_out(int format)
     return b;
 }
 
+BIO *dup_bio_err(int format)
+{
+    BIO *b = BIO_new_fp(stderr,
+                        BIO_NOCLOSE | (istext(format) ? BIO_FP_TEXT : 0));
+#ifdef OPENSSL_SYS_VMS
+    if (istext(format))
+        b = BIO_push(BIO_new(BIO_f_linebuffer()), b);
+#endif
+    return b;
+}
+
 void unbuffer(FILE *fp)
 {
     setbuf(fp, NULL);
diff --git a/apps/apps.h b/apps/apps.h
index 7be7325..fc480e1 100644
--- a/apps/apps.h
+++ b/apps/apps.h
@@ -156,6 +156,7 @@ extern BIO *bio_out;
 extern BIO *bio_err;
 BIO *dup_bio_in(int format);
 BIO *dup_bio_out(int format);
+BIO *dup_bio_err(int format);
 BIO *bio_open_owner(const char *filename, int format, int private);
 BIO *bio_open_default(const char *filename, char mode, int format);
 BIO *bio_open_default_quiet(const char *filename, char mode, int format);
diff --git a/apps/openssl.c b/apps/openssl.c
index d460a6b..2d9ddaa 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -229,7 +229,7 @@ int main(int argc, char *argv[])
     default_config_file = make_config_name();
     bio_in = dup_bio_in(FORMAT_TEXT);
     bio_out = dup_bio_out(FORMAT_TEXT);
-    bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
+    bio_err = dup_bio_err(FORMAT_TEXT);
 
 #if defined( OPENSSL_SYS_VMS)
     copied_argv = argv = copy_argv(&argc, argv);


More information about the openssl-commits mailing list