summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2022-02-15 13:47:28 +0100
committerJustus Winter <justus@sequoia-pgp.org>2022-03-28 14:08:09 +0200
commitb41958f99f24022f0f71e67bb57ab4def74267ca (patch)
tree4fe3fe4b964310d3852620b8e83ed3bf95e36b19 /openpgp/src/parse.rs
parentf66d98e0fac7320af3e918bbb69f09b130df3d63 (diff)
openpgp: Explicit SEIP packet version in the message parser.
- In order to deal with version 2 SEIP packets, we first need to be explicit about the packet version in the message parser. - Rename the token and grammar rules, pass in a version to MessageParser::push.
Diffstat (limited to 'openpgp/src/parse.rs')
-rw-r--r--openpgp/src/parse.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs
index 81549c50..a3514680 100644
--- a/openpgp/src/parse.rs
+++ b/openpgp/src/parse.rs
@@ -4592,7 +4592,9 @@ impl <'a> PacketParser<'a> {
},
ParserResult::Success(mut pp) => {
let path = pp.path().to_vec();
- pp.state.message_validator.push(pp.packet.tag(), &path);
+ pp.state.message_validator.push(
+ pp.packet.tag(), pp.packet.version(),
+ &path);
pp.state.keyring_validator.push(pp.packet.tag());
pp.state.cert_validator.push(pp.packet.tag());
@@ -4680,7 +4682,9 @@ impl <'a> PacketParser<'a> {
self.packet.tag(), pp.packet.tag());
pp.state.message_validator.push(
- pp.packet.tag(), &path);
+ pp.packet.tag(),
+ pp.packet.version(),
+ &path);
pp.state.keyring_validator.push(pp.packet.tag());
pp.state.cert_validator.push(pp.packet.tag());