mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-05 12:31:50 +01:00
2f4ad05fcd
* Makefile.am: Build the test infrastructure on Windows. * tests/openpgp/Makefile.am (required_pgms): Add gpgscm. (TESTS_ENVIRONMENT): Make sure gpgscm and the libraries are found. (TESTS): Replace tests with the new Scheme implementations. * tests/openpgp/4gb-packet.scm: New file. * tests/openpgp/README: Likewise. * tests/openpgp/armdetach.scm: Likewise. * tests/openpgp/armdetachm.scm: Likewise. * tests/openpgp/armencrypt.scm: Likewise. * tests/openpgp/armencryptp.scm: Likewise. * tests/openpgp/armor.scm: Likewise. * tests/openpgp/armsignencrypt.scm: Likewise. * tests/openpgp/armsigs.scm: Likewise. * tests/openpgp/clearsig.scm: Likewise. * tests/openpgp/conventional-mdc.scm: Likewise. * tests/openpgp/conventional.scm: Likewise. * tests/openpgp/decrypt-dsa.scm: Likewise. * tests/openpgp/decrypt.scm: Likewise. * tests/openpgp/default-key.scm: Likewise. * tests/openpgp/defs.scm: Likewise. * tests/openpgp/detach.scm: Likewise. * tests/openpgp/detachm.scm: Likewise. * tests/openpgp/ecc.scm: Likewise. * tests/openpgp/encrypt-dsa.scm: Likewise. * tests/openpgp/encrypt.scm: Likewise. * tests/openpgp/encryptp.scm: Likewise. * tests/openpgp/finish.scm: Likewise. * tests/openpgp/genkey1024.scm: Likewise. * tests/openpgp/gpgtar.scm: Likewise. * tests/openpgp/import.scm: Likewise. * tests/openpgp/mds.scm: Likewise. * tests/openpgp/multisig.scm: Likewise. * tests/openpgp/run-tests.scm: Likewise. * tests/openpgp/seat.scm: Likewise. * tests/openpgp/setup.scm: Likewise. * tests/openpgp/signencrypt-dsa.scm: Likewise. * tests/openpgp/signencrypt.scm: Likewise. * tests/openpgp/sigs-dsa.scm: Likewise. * tests/openpgp/sigs.scm: Likewise. * tests/openpgp/use-exact-key.scm: Likewise. * tests/openpgp/verify.scm: Likewise. * tests/openpgp/version.scm: Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
34 lines
917 B
Scheme
Executable File
34 lines
917 B
Scheme
Executable File
#!/usr/bin/env gpgscm
|
|
|
|
(load (with-path "defs.scm"))
|
|
|
|
(for-each-p
|
|
"Checking signing with the default hash algorithm"
|
|
(lambda (source)
|
|
(tr:do
|
|
(tr:open source)
|
|
(tr:gpg "" '(--yes --sign))
|
|
(tr:gpg "" '(--yes))
|
|
(tr:assert-identity source)))
|
|
(append plain-files data-files))
|
|
|
|
(for-each-p
|
|
"Checking signing with a specific hash algorithm"
|
|
(lambda (hash)
|
|
(if (have-pubkey-algo? "RSA")
|
|
;; RSA key, so any hash is okay.
|
|
(tr:do
|
|
(tr:open (car plain-files))
|
|
(tr:gpg "" `(--yes --sign --user ,usrname3 --digest-algo ,hash))
|
|
(tr:gpg "" '(--yes))
|
|
(tr:assert-identity (car plain-files))))
|
|
(if (not (equal? "MD5" hash))
|
|
;; Using the DSA sig key - only 160 bit or larger hashes
|
|
(tr:do
|
|
(tr:open (car plain-files))
|
|
(tr:gpg usrpass1
|
|
`(--yes --sign --passphrase-fd "0" --digest-algo ,hash))
|
|
(tr:gpg "" '(--yes))
|
|
(tr:assert-identity (car plain-files)))))
|
|
all-hash-algos)
|