From 40aaa2dd2f7e825efb18b6869c5a7a1724ab60fb Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 18 Nov 2022 11:09:14 +0100 Subject: openpgp: Ignore marker packets when validating cert streams. - While we correctly ignored marker packets in the CertParser, we did not ignore them in the CertValidator. This made sq inspect complain about marker packets in certrings. --- openpgp/src/cert/parser/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'openpgp/src/cert') diff --git a/openpgp/src/cert/parser/mod.rs b/openpgp/src/cert/parser/mod.rs index f7b3289a..32270b48 100644 --- a/openpgp/src/cert/parser/mod.rs +++ b/openpgp/src/cert/parser/mod.rs @@ -157,6 +157,12 @@ impl KeyringValidator { Tag::UserAttribute => Token::UserAttribute(None), Tag::Signature => Token::Signature(None), Tag::Trust => Token::Trust(None), + Tag::Marker => { + // Ignore Marker Packet. RFC4880, section 5.8: + // + // Such a packet MUST be ignored when received. + return; + }, _ => { // Unknown token. self.error = Some(CertParserError::OpenPGP( -- cgit v1.2.3