aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-01-25 14:39:30 +0000
committerJustus Winter <[email protected]>2017-01-25 14:39:30 +0000
commit7d5a0ed792133d875fcedb6e23a9a3682f1a23f9 (patch)
tree99fd143066c075e7030599eb918f5a30f7c1bc0e
parentagent: Fix double free. (diff)
downloadgnupg-7d5a0ed792133d875fcedb6e23a9a3682f1a23f9.tar.gz
gnupg-7d5a0ed792133d875fcedb6e23a9a3682f1a23f9.zip
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 <[email protected]>
-rw-r--r--tests/gpgsm/verify.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gpgsm/verify.scm b/tests/gpgsm/verify.scm
index 894c8278a..28210a9a3 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 `(,@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 `(,@gpgsm --verify ,sig ,body))))))