mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
tests: Delay querying the avaliable algorithms.
* tests/openpgp/defs.scm: Set verbosity earlier, turn 'all-*-algos' into promises. * tests/openpgp/conventional-mdc.scm: Force the promises. * tests/openpgp/conventional.scm: Likewise. * tests/openpgp/encrypt-dsa.scm: Likewise. * tests/openpgp/encrypt.scm: Likewise. * tests/openpgp/gpgtar.scm: Likewise. * tests/openpgp/sigs.scm: Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
6ce14a805f
commit
893a3f7fb4
@ -37,7 +37,7 @@
|
|||||||
(tr:gpg passphrase `(--yes --passphrase-fd "0" ,s2k))
|
(tr:gpg passphrase `(--yes --passphrase-fd "0" ,s2k))
|
||||||
(tr:assert-identity source)))
|
(tr:assert-identity source)))
|
||||||
'("plain-1" "data-80000")))
|
'("plain-1" "data-80000")))
|
||||||
all-cipher-algos)
|
(force all-cipher-algos))
|
||||||
|
|
||||||
(for-each-p
|
(for-each-p
|
||||||
"Checking sign+symencrypt"
|
"Checking sign+symencrypt"
|
||||||
|
@ -46,4 +46,4 @@
|
|||||||
(tr:gpg passphrase `(--yes --passphrase-fd "0" ,s2k))
|
(tr:gpg passphrase `(--yes --passphrase-fd "0" ,s2k))
|
||||||
(tr:assert-identity source)))
|
(tr:assert-identity source)))
|
||||||
'("plain-1" "data-80000")))
|
'("plain-1" "data-80000")))
|
||||||
all-cipher-algos)
|
(force all-cipher-algos))
|
||||||
|
@ -42,6 +42,10 @@
|
|||||||
(define data-files '("data-500" "data-9000" "data-32000" "data-80000"))
|
(define data-files '("data-500" "data-9000" "data-32000" "data-80000"))
|
||||||
(define exp-files '())
|
(define exp-files '())
|
||||||
|
|
||||||
|
(let ((verbose (string->number (getenv "verbose"))))
|
||||||
|
(if (number? verbose)
|
||||||
|
(*set-verbose!* verbose)))
|
||||||
|
|
||||||
(define (qualify executable)
|
(define (qualify executable)
|
||||||
(string-append executable (getenv "EXEEXT")))
|
(string-append executable (getenv "EXEEXT")))
|
||||||
|
|
||||||
@ -95,16 +99,16 @@
|
|||||||
(define (get-config what)
|
(define (get-config what)
|
||||||
(string-split (caddar (gpg-with-colons `(--list-config ,what))) #\;))
|
(string-split (caddar (gpg-with-colons `(--list-config ,what))) #\;))
|
||||||
|
|
||||||
(define all-pubkey-algos (get-config "pubkeyname"))
|
(define all-pubkey-algos (delay (get-config "pubkeyname")))
|
||||||
(define all-hash-algos (get-config "digestname"))
|
(define all-hash-algos (delay (get-config "digestname")))
|
||||||
(define all-cipher-algos (get-config "ciphername"))
|
(define all-cipher-algos (delay (get-config "ciphername")))
|
||||||
|
|
||||||
(define (have-pubkey-algo? x)
|
(define (have-pubkey-algo? x)
|
||||||
(not (not (member x all-pubkey-algos))))
|
(not (not (member x (force all-pubkey-algos)))))
|
||||||
(define (have-hash-algo? x)
|
(define (have-hash-algo? x)
|
||||||
(not (not (member x all-hash-algos))))
|
(not (not (member x (force all-hash-algos)))))
|
||||||
(define (have-cipher-algo? x)
|
(define (have-cipher-algo? x)
|
||||||
(not (not (member x all-cipher-algos))))
|
(not (not (member x (force all-cipher-algos)))))
|
||||||
|
|
||||||
(define (gpg-pipe args0 args1 errfd)
|
(define (gpg-pipe args0 args1 errfd)
|
||||||
(lambda (source sink)
|
(lambda (source sink)
|
||||||
@ -142,10 +146,6 @@
|
|||||||
(pipe:spawn `(,@GPG --dearmor))
|
(pipe:spawn `(,@GPG --dearmor))
|
||||||
(pipe:write-to sink-name (logior O_WRONLY O_CREAT O_BINARY) #o600)))
|
(pipe:write-to sink-name (logior O_WRONLY O_CREAT O_BINARY) #o600)))
|
||||||
|
|
||||||
(let ((verbose (string->number (getenv "verbose"))))
|
|
||||||
(if (number? verbose)
|
|
||||||
(*set-verbose!* verbose)))
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Support for test environment creation and teardown.
|
;; Support for test environment creation and teardown.
|
||||||
;;
|
;;
|
||||||
|
@ -43,4 +43,4 @@
|
|||||||
(tr:gpg "" '(--yes))
|
(tr:gpg "" '(--yes))
|
||||||
(tr:assert-identity source)))
|
(tr:assert-identity source)))
|
||||||
(append plain-files data-files)))
|
(append plain-files data-files)))
|
||||||
all-cipher-algos)
|
(force all-cipher-algos))
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
(tr:gpg "" '(--yes))
|
(tr:gpg "" '(--yes))
|
||||||
(tr:assert-identity source)))
|
(tr:assert-identity source)))
|
||||||
(append plain-files data-files)))
|
(append plain-files data-files)))
|
||||||
all-cipher-algos)
|
(force all-cipher-algos))
|
||||||
|
|
||||||
|
|
||||||
;; We encrypt to two keys and we have also put the first key into our
|
;; We encrypt to two keys and we have also put the first key into our
|
||||||
|
@ -84,7 +84,8 @@
|
|||||||
|
|
||||||
(info "Checking gpgtar with symmetric encryption and chosen cipher")
|
(info "Checking gpgtar with symmetric encryption and chosen cipher")
|
||||||
(do-test `(,@ppflags --symmetric --gpg-args
|
(do-test `(,@ppflags --symmetric --gpg-args
|
||||||
,(string-append "--cipher=" (car all-cipher-algos)))
|
,(string-append "--cipher="
|
||||||
|
(car (force all-cipher-algos))))
|
||||||
ppflags (cons '--decrypt ppflags))
|
ppflags (cons '--decrypt ppflags))
|
||||||
|
|
||||||
(info "Checking gpgtar with both symmetric and asymmetric encryption")
|
(info "Checking gpgtar with both symmetric and asymmetric encryption")
|
||||||
|
@ -48,4 +48,4 @@
|
|||||||
`(--yes --sign --passphrase-fd "0" --digest-algo ,hash))
|
`(--yes --sign --passphrase-fd "0" --digest-algo ,hash))
|
||||||
(tr:gpg "" '(--yes))
|
(tr:gpg "" '(--yes))
|
||||||
(tr:assert-identity (car plain-files)))))
|
(tr:assert-identity (car plain-files)))))
|
||||||
all-hash-algos)
|
(force all-hash-algos))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user