diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2024-04-18 11:54:17 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2024-05-07 09:10:32 +0200 |
commit | 978c73968b3eb180e2c4ed24593adf736d713beb (patch) | |
tree | cd72bcecfffa0f15c1ab4323a6da57940bfac9b2 /openpgp | |
parent | 2743369cbe6a09fcb37fb70be1e87b4c83a8a35e (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.
Diffstat (limited to 'openpgp')
-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, |