tests: gnupg: Factor out and export KEY-FINGERPRINT-VECTOR.

* guix/tests/gnupg.scm (key-fingerprint-vector): New procedure.  Export it.
(key-fingerprint): Use it.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This commit is contained in:
Attila Lendvai 2021-12-22 11:28:57 +01:00 committed by Mathieu Othacehe
parent 07145c8a8c
commit 037c2b6d3a
No known key found for this signature in database
GPG key ID: 8354763531769CA6

View file

@ -35,6 +35,7 @@ (define-module (guix tests gnupg)
read-openpgp-packet
key-fingerprint
key-fingerprint-vector
key-id))
(define gpg-command
@ -82,7 +83,10 @@ (define (read-openpgp-packet file)
(open-bytevector-input-port
(call-with-input-file file read-radix-64))))
(define key-fingerprint-vector
(compose openpgp-public-key-fingerprint
read-openpgp-packet))
(define key-fingerprint
(compose openpgp-format-fingerprint
openpgp-public-key-fingerprint
read-openpgp-packet))
key-fingerprint-vector))