From 56c114e51e6cd74719bdfd90f160eb6220f63ae6 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 19 Dec 2019 15:42:20 +0100 Subject: openpgp: Store unknown packet data in struct Unknown. --- openpgp/src/parse/parse.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'openpgp/src/parse') 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() { -- cgit v1.2.3