From: Richard Levitte <levitte@openssl.org>
Date: Thu, 30 Apr 2015 17:52:36 +0000 (+0200)
Subject: Push the line buffer filter on the out BIO on VMS
X-Git-Tag: OpenSSL_1_1_0-pre1~663
X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ca904707b6df0f5077f9eff94f29bd8035d042a7;p=oweals%2Fopenssl.git

Push the line buffer filter on the out BIO on VMS

VMS files are normally record oriented rather than stream oriented.
This means that every write() will create a new record, which is seen
as a line of its own, regardless of if there was a \n in there or not.
bntest uses BN_print, which prints out number with more than one
write(), thereby dividing up the numbers in several lines, which
greatly disturbs the post-bntest checks that expect to find a full
formula to calculate on one line.

So, for VMS, we need to push the linebuffer filter on the out BIO.

Reviewed-by: Rich Salz <rsalz@openssl.org>
---

diff --git a/test/bntest.c b/test/bntest.c
index 675d0eb261..be358c82d1 100644
--- a/test/bntest.c
+++ b/test/bntest.c
@@ -175,6 +175,12 @@ int main(int argc, char *argv[])
             EXIT(1);
         }
     }
+#ifdef OPENSSL_SYS_VMS
+    {
+        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
+        out = BIO_push(tmpbio, out);
+    }
+#endif
 
     if (!results)
         BIO_puts(out, "obase=16\nibase=16\n");