diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2022-02-22 12:28:27 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2022-02-22 14:12:27 +0100 |
commit | 95567183719ef14ecd098ac8be9714ef2c4a93a5 (patch) | |
tree | 913ce89ed02ad827be086625041b0480ff6b214d /openpgp/src/keyid.rs | |
parent | 347416175320c0b93ef71debece5b341d4e36fd5 (diff) |
openpgp: Support v5 fingerprints.
- Supporting v5 fingerprints is important so that we can process
signature subpackets containing them, even if we don't yet support
any v5 formats. Consider being part of a group of recipients
where one of the recipients has a v5 key: then, the intended
recipient fingerprint subpacket contains a v5 fingerprint for that
v5 recipient. See also #820.
Diffstat (limited to 'openpgp/src/keyid.rs')
-rw-r--r-- | openpgp/src/keyid.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openpgp/src/keyid.rs b/openpgp/src/keyid.rs index b4689488..e93c603d 100644 --- a/openpgp/src/keyid.rs +++ b/openpgp/src/keyid.rs @@ -140,6 +140,8 @@ impl From<&Fingerprint> for KeyID { match fp { Fingerprint::V4(fp) => KeyID::from_bytes(&fp[fp.len() - 8..]), + Fingerprint::V5(fp) => + KeyID::Invalid(fp.iter().cloned().collect()), Fingerprint::Invalid(fp) => { KeyID::Invalid(fp.clone()) } @@ -152,6 +154,8 @@ impl From<Fingerprint> for KeyID { match fp { Fingerprint::V4(fp) => KeyID::from_bytes(&fp[fp.len() - 8..]), + Fingerprint::V5(fp) => + KeyID::Invalid(fp.into()), Fingerprint::Invalid(fp) => { KeyID::Invalid(fp) } |