[Pkg-gnupg-commit] [gnupg2] 18/166: tests, w32: Fix gpgsm signature verification test.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Mar 16 22:33:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch experimental
in repository gnupg2.
commit 7d5a0ed792133d875fcedb6e23a9a3682f1a23f9
Author: Justus Winter <justus at g10code.com>
Date: Wed Jan 25 15:39:30 2017 +0100
tests,w32: Fix gpgsm signature verification test.
* tests/gpgsm/verify.scm: Use 'call-with-binary-output-file' to avoid
automatic line-ending conversion.
--
Previously, Windows' automatic line-ending conversion turned '\n' into
'\r\n' when writing the sample to a file, making the signature
invalid.
Signed-off-by: Justus Winter <justus at g10code.com>
---
tests/gpgsm/verify.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/gpgsm/verify.scm b/tests/gpgsm/verify.scm
index 894c827..28210a9 100644
--- a/tests/gpgsm/verify.scm
+++ b/tests/gpgsm/verify.scm
@@ -54,12 +54,12 @@ MYdRclgjObCcoilA8fZ13VR4DiMJVFCxJL4qVWI=
;;
(info "Checking that a valid signature is verified as such.")
(lettmp (sig body)
- (with-output-to-file sig (lambda () (display test-sig1)))
- (with-output-to-file body (lambda () (display test-text1)))
+ (call-with-binary-output-file sig (lambda (port) (display test-sig1 port)))
+ (call-with-binary-output-file body (lambda (port) (display test-text1 port)))
(call-check `(, at gpgsm --verify ,sig ,body)))
(info "Checking that an invalid signature is verified as such.")
(lettmp (sig body)
- (with-output-to-file sig (lambda () (display test-sig1)))
- (with-output-to-file body (lambda () (display test-text1f)))
+ (call-with-binary-output-file sig (lambda (port) (display test-sig1 port)))
+ (call-with-binary-output-file body (lambda (port) (display test-text1f port)))
(assert (not (zero? (call `(, at gpgsm --verify ,sig ,body))))))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list