From 3d18446acef5462e946fe79909b198b35c2bbfa0 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 29 May 2016 01:23:34 +0300 Subject: Port to MinGW --- bpkg/auth.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bpkg/auth.cxx') diff --git a/bpkg/auth.cxx b/bpkg/auth.cxx index 5296bc8..591c6a5 100644 --- a/bpkg/auth.cxx +++ b/bpkg/auth.cxx @@ -679,7 +679,9 @@ namespace bpkg try { - ofdstream os (pr.out_fd); + // Write the signature to the openssl process input in the binary mode. + // + ofdstream os (pr.out_fd, fdtranslate::binary); os.exceptions (ofdstream::badbit); for (const auto& c: sm.signature) @@ -763,7 +765,9 @@ namespace bpkg process pr (start_openssl ( co, "pkeyutl", {"-sign", "-inkey", key_name.c_str ()}, true, true)); - ifdstream is (pr.in_ofd); + // Read the signature from the openssl process output in the binary mode. + // + ifdstream is (pr.in_ofd, fdtranslate::binary); is.exceptions (ifdstream::badbit); try -- cgit v1.1