mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
tests/openpgp: Improve tests.
* tests/openpgp/multisig.scm: Simplify test. * tests/openpgp/setup.scm (dearmor): Use pipe. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
332fa86982
commit
1e822654c1
2 changed files with 14 additions and 15 deletions
|
@ -156,17 +156,13 @@ cnksIEkgY2FuJ3QgZG8gdGhhdAo=
|
|||
(for-each-p
|
||||
"Checking that an invalid signature is verified as such"
|
||||
(lambda (armored-file)
|
||||
(tr:do
|
||||
(tr:pipe-do
|
||||
(pipe:echo (eval armored-file (current-environment)))
|
||||
(pipe:spawn `(,@GPG --dearmor)))
|
||||
;; XXX: this is ugly
|
||||
(lambda args
|
||||
(if (catch #f ;; verifikation failed, this is what we want
|
||||
(apply (tr:spawn "" `(,@GPG --verify **in**)) args)
|
||||
;; verification succeded, this is an error.
|
||||
#t)
|
||||
(error "invalid signature is valid")
|
||||
args))))
|
||||
(lettmp (file)
|
||||
(pipe:do
|
||||
(pipe:echo (eval armored-file (current-environment)))
|
||||
(pipe:spawn `(,@GPG --dearmor))
|
||||
(pipe:write-to file (logior O_WRONLY O_CREAT O_BINARY) #o600))
|
||||
|
||||
(if (= 0 (call `(,@GPG --verify ,file)))
|
||||
(error "Bad signature verified ok")))
|
||||
'(sig-1ls1ls-valid sig-ls-valid sig-1lsls-invalid
|
||||
sig-lsls-invalid sig-lss-invalid sig-slsl-invalid))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue