diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2022-01-07 14:54:04 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2022-01-10 15:13:05 +0100 |
commit | 4098dbaa63010f35cf36909eb364938f4faa9d79 (patch) | |
tree | f6a1bb85fe9815db8c8127525b0bbea94cdea872 /openpgp/src/parse.rs | |
parent | 0688296ced91ac933a1c81688015d2f02df48b19 (diff) |
openpgp: Deduplicate code parsing fingerprints.
Diffstat (limited to 'openpgp/src/parse.rs')
-rw-r--r-- | openpgp/src/parse.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs index 1fe8899d..3afc077c 100644 --- a/openpgp/src/parse.rs +++ b/openpgp/src/parse.rs @@ -1719,12 +1719,7 @@ impl Subpacket { } let bytes = php.parse_bytes("issuer fp", len - 1)?; SubpacketValue::IssuerFingerprint( - match version { - 4 => Fingerprint::from_bytes(&bytes), - // XXX: Fix once we dig V5. - 5 => Fingerprint::Invalid(bytes.into()), - _ => Fingerprint::Invalid(bytes.into()), - }) + Fingerprint::from_bytes(&bytes)) }, SubpacketTag::PreferredAEADAlgorithms => SubpacketValue::PreferredAEADAlgorithms( @@ -1750,12 +1745,7 @@ impl Subpacket { } let bytes = php.parse_bytes("intended rcpt", len - 1)?; SubpacketValue::IntendedRecipient( - match version { - 4 => Fingerprint::from_bytes(&bytes), - // XXX: Fix once we dig V5. - 5 => Fingerprint::Invalid(bytes.into()), - _ => Fingerprint::Invalid(bytes.into()), - }) + Fingerprint::from_bytes(&bytes)) }, SubpacketTag::AttestedCertifications => { // If we don't know the hash algorithm, put all digest |