summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2022-02-22 12:28:27 +0100
committerJustus Winter <justus@sequoia-pgp.org>2022-02-22 14:12:27 +0100
commit95567183719ef14ecd098ac8be9714ef2c4a93a5 (patch)
tree913ce89ed02ad827be086625041b0480ff6b214d /openpgp/src/serialize.rs
parent347416175320c0b93ef71debece5b341d4e36fd5 (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/serialize.rs')
-rw-r--r--openpgp/src/serialize.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/openpgp/src/serialize.rs b/openpgp/src/serialize.rs
index c953bcb2..dea98dc1 100644
--- a/openpgp/src/serialize.rs
+++ b/openpgp/src/serialize.rs
@@ -1457,6 +1457,10 @@ impl Marshal for SubpacketValue {
o.write_all(&[4])?;
o.write_all(fp.as_bytes())?;
},
+ Fingerprint::V5(_) => {
+ o.write_all(&[5])?;
+ o.write_all(fp.as_bytes())?;
+ },
_ => return Err(Error::InvalidArgument(
"Unknown kind of fingerprint".into()).into()),
}
@@ -1469,6 +1473,10 @@ impl Marshal for SubpacketValue {
o.write_all(&[4])?;
o.write_all(fp.as_bytes())?;
},
+ Fingerprint::V5(_) => {
+ o.write_all(&[5])?;
+ o.write_all(fp.as_bytes())?;
+ },
_ => return Err(Error::InvalidArgument(
"Unknown kind of fingerprint".into()).into()),
}