blob: fba95d969f11659f7230d3a9249a361fa29cfe14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/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)
|