From e6fb5aa0686830fdb6f57282fe489b81d6a856b9 Mon Sep 17 00:00:00 2001 From: Wiktor Kwapisiewicz Date: Tue, 15 Dec 2020 11:26:34 +0100 Subject: openpgp: Use hash_algo_security for self signatures and revocations. - This uses calculated hash algorithm security instead of a hard-coded value. --- openpgp/src/cert/amalgamation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpgp/src/cert/amalgamation.rs b/openpgp/src/cert/amalgamation.rs index 169898a8..edb86851 100644 --- a/openpgp/src/cert/amalgamation.rs +++ b/openpgp/src/cert/amalgamation.rs @@ -1156,7 +1156,7 @@ impl<'a, C> ValidComponentAmalgamation<'a, C> pub fn self_signatures(&self) -> impl Iterator + Send + Sync { std::ops::Deref::deref(self).self_signatures() .filter(move |sig| self.cert.policy().signature(sig, - HashAlgoSecurity::SecondPreImageResistance).is_ok()) + self.hash_algo_security).is_ok()) } /// The component's third-party certifications. @@ -1175,7 +1175,7 @@ impl<'a, C> ValidComponentAmalgamation<'a, C> pub fn self_revocations(&self) -> impl Iterator + Send + Sync { std::ops::Deref::deref(self).self_revocations() .filter(move |sig|self.cert.policy().signature(sig, - HashAlgoSecurity::SecondPreImageResistance).is_ok()) + self.hash_algo_security).is_ok()) } /// The component's revocations that were issued by other -- cgit v1.2.3