summaryrefslogtreecommitdiffstats
path: root/openpgp/src/cert
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2022-11-18 11:09:14 +0100
committerJustus Winter <justus@sequoia-pgp.org>2022-11-18 11:16:10 +0100
commit40aaa2dd2f7e825efb18b6869c5a7a1724ab60fb (patch)
tree9c995394a287331a04195bc03673570edf250367 /openpgp/src/cert
parent551381ee99c4d76825dc370c662c632913bd9393 (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.rs6
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(