diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2022-11-18 11:09:14 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2022-11-18 11:16:10 +0100 |
commit | 40aaa2dd2f7e825efb18b6869c5a7a1724ab60fb (patch) | |
tree | 9c995394a287331a04195bc03673570edf250367 /openpgp/src/cert | |
parent | 551381ee99c4d76825dc370c662c632913bd9393 (diff) |
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.
Diffstat (limited to 'openpgp/src/cert')
-rw-r--r-- | openpgp/src/cert/parser/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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( |