summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWiktor Kwapisiewicz <wiktor@metacode.biz>2020-12-15 11:26:34 +0100
committerWiktor Kwapisiewicz <wiktor@metacode.biz>2020-12-15 11:26:34 +0100
commite6fb5aa0686830fdb6f57282fe489b81d6a856b9 (patch)
treef3a0c0f736a6759697bb8b29fb4bebfe6a437da8
parent4df9befdb10cc336a9df49b65fdfef659296aa61 (diff)
openpgp: Use hash_algo_security for self signatures and revocations.
- This uses calculated hash algorithm security instead of a hard-coded value.
-rw-r--r--openpgp/src/cert/amalgamation.rs4
1 files 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<Item=&Signature> + 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<Item=&Signature> + 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