diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2024-04-18 11:54:17 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2024-04-23 11:58:34 +0200 |
commit | 903c44c8d2a7e6dbf109fa117ed948ae3d90ca82 (patch) | |
tree | 5012d8133485bc327692b18cc4e6ee14f23bab44 | |
parent | 01e8ad01fa8047ab740379bc63f01b56fdbfa84f (diff) |
openpgp: Align hash algo security parameter for unknown bundles.
- Unknown::hash_algo_security returns CollisionResistance, and that
is what we use for UnknownBundles elsewhere in the grammar. We
should hold all UnknownBundles to the higher bar of requiring
CollisionResistance.
-rw-r--r-- | openpgp/src/cert/parser/low_level/grammar.lalrpop | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openpgp/src/cert/parser/low_level/grammar.lalrpop b/openpgp/src/cert/parser/low_level/grammar.lalrpop index d566d420..b15ee333 100644 --- a/openpgp/src/cert/parser/low_level/grammar.lalrpop +++ b/openpgp/src/cert/parser/low_level/grammar.lalrpop @@ -10,7 +10,7 @@ use crate::packet::UserAttribute; use crate::packet::{key, Key}; use crate::packet::Unknown; use crate::Packet; -use crate::policy::HashAlgoSecurity::SecondPreImageResistance; +use crate::policy::HashAlgoSecurity::CollisionResistance; use crate::cert::prelude::*; use crate::cert::parser::low_level::lexer; @@ -180,7 +180,7 @@ Component: Option<Component> = { SubkeyBundle::new(key, sec, sigs))) }, Some(Err(u)) => Some(Component::UnknownBundle( - UnknownBundle::new(u, SecondPreImageResistance, + UnknownBundle::new(u, CollisionResistance, sigs.unwrap_or_default()))), // Just validating a cert... None => None, @@ -196,7 +196,7 @@ Component: Option<Component> = { UserIDBundle::new(u, sec, sigs))) }, Some(Err(u)) => Some(Component::UnknownBundle( - UnknownBundle::new(u, SecondPreImageResistance, + UnknownBundle::new(u, CollisionResistance, sigs.unwrap_or_default()))), // Just validating a cert... None => None, @@ -212,7 +212,7 @@ Component: Option<Component> = { UserAttributeBundle::new(u, sec, sigs))) }, Some(Err(u)) => Some(Component::UnknownBundle( - UnknownBundle::new(u, SecondPreImageResistance, + UnknownBundle::new(u, CollisionResistance, sigs.unwrap_or_default()))), // Just validating a cert... None => None, |