diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-12-19 15:42:20 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-12-20 18:04:56 +0100 |
commit | 56c114e51e6cd74719bdfd90f160eb6220f63ae6 (patch) | |
tree | 93e8b518633e42f5eace189a0c796825934f736c /openpgp/src/parse | |
parent | 046cbc7837cfae8505cb77cdc0352eeaac023a85 (diff) |
openpgp: Store unknown packet data in struct Unknown.
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r-- | openpgp/src/parse/parse.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/openpgp/src/parse/parse.rs b/openpgp/src/parse/parse.rs index e7b1e293..3a3686a8 100644 --- a/openpgp/src/parse/parse.rs +++ b/openpgp/src/parse/parse.rs @@ -3613,6 +3613,17 @@ impl <'a> PacketParser<'a> { Ok(p.body()) }, + Packet::Unknown(p) => { + if rest.len() > 0 { + if p.body().len() > 0 { + p.body_mut().append(&mut rest); + } else { + p.set_body(rest); + } + } + + Ok(p.body()) + }, p => { if rest.len() > 0 { if let Some(body) = p.body_mut() { |