diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-05-29 01:23:34 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-05-31 19:14:39 +0300 |
commit | 3d18446acef5462e946fe79909b198b35c2bbfa0 (patch) | |
tree | eb60dab710569543bb8dd314e63eda745a4c166c /bpkg/auth.cxx | |
parent | 45e82ae43be6444b0260daaf08eeb084eddbdb34 (diff) |
Port to MinGW
Diffstat (limited to 'bpkg/auth.cxx')
-rw-r--r-- | bpkg/auth.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
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 |