From ca904707b6df0f5077f9eff94f29bd8035d042a7 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 30 Apr 2015 19:52:36 +0200 Subject: [PATCH] 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 --- test/bntest.c | 6 ++++++ 1 file changed, 6 insertions(+) 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"); -- 2.25.1