openpgp: Decode the issuer-fingerprint signature subpacket.
authorLudovic Courtès <ludo@gnu.org>
Sat, 25 Apr 2020 21:23:51 +0000 (23:23 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 4 May 2020 07:56:12 +0000 (09:56 +0200)
commit4459c7859c286ab54fa3a9901c8a17591b04c516
tree867a6768699931c621b7c41d5fbfaa58f4d5ffa7
parent43408e304ffb1149f35cb539b40d673d567c9116
openpgp: Decode the issuer-fingerprint signature subpacket.

* guix/openpgp.scm (SUBPACKET-ISSUER-FINGERPRINT): New variable.
(openpgp-signature-issuer-fingerprint): New procedure.
(key-id-matches-fingerprint?): New procedure.
(get-signature): Look for the 'issuer and 'issuer-fingerprint
subpackets.  Ensure the issuer key ID matches the fingerprint when both
are available.
(parse-subpackets): Handle SUBPACKET-ISSUER-FINGERPRINT.
* tests/openpgp.scm (%rsa-key-fingerprint)
(%dsa-key-fingerprint, %ed25519-key-fingerprint): New variables.
* tests/openpgp.scm ("get-openpgp-detached-signature/ascii"): Check the
result of 'openpgp-signature-issuer-fingerprint'.
guix/openpgp.scm
tests/openpgp.scm