diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2021-04-20 15:52:25 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2021-04-26 13:13:22 +0200 |
commit | 0c349869786194214aca9ccb5f66640b28163f79 (patch) | |
tree | 5e2895d67d7fe9c58c99c7bf6ae9eb7ff6655809 /openpgp/src/serialize.rs | |
parent | 7961a663239567089508c7962a6c77d22b588c3a (diff) |
openpgp: Expose support for attested certifications.
- This is a low-level interface. We will provide nicer abstractions
in a followup.
- See #335.
Diffstat (limited to 'openpgp/src/serialize.rs')
-rw-r--r-- | openpgp/src/serialize.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openpgp/src/serialize.rs b/openpgp/src/serialize.rs index 6890533f..d13d461c 100644 --- a/openpgp/src/serialize.rs +++ b/openpgp/src/serialize.rs @@ -1483,6 +1483,11 @@ impl Marshal for SubpacketValue { _ => return Err(Error::InvalidArgument( "Unknown kind of fingerprint".into()).into()), } + AttestedCertifications(digests) => { + for digest in digests { + o.write_all(digest)?; + } + }, Unknown { body, .. } => o.write_all(body)?, } @@ -1530,6 +1535,8 @@ impl MarshalInto for SubpacketValue { // Educated guess for unknown versions. Fingerprint::Invalid(_) => 1 + fp.as_bytes().len(), }, + AttestedCertifications(digests) => + digests.iter().map(|d| d.len()).sum(), Unknown { body, .. } => body.len(), } } |