From 0df4c723d985eb49065bc84368748f940c07c2a7 Mon Sep 17 00:00:00 2001 From: Malte Meiboom Date: Tue, 12 May 2026 11:18:42 +0200 Subject: [PATCH] Fix bug in get_local_certifcates - Use the trust amount of the whole path instead of just the last link. --- src/common/crypto.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/crypto.rs b/src/common/crypto.rs index 753d9b9..d7865cf 100644 --- a/src/common/crypto.rs +++ b/src/common/crypto.rs @@ -88,9 +88,9 @@ pub fn get_local_certificates<'hc>(context: &HuskContext<'hc>, email: &str) for (fpr, some_userid) in bindings { if let Some(userid) = some_userid { let paths = n.authenticate(userid, &fpr, wot::FULLY_TRUSTED); - if !paths.is_empty() { - log::debug!("{} authenticated!!!", email); - for (path, _) in paths.iter() { + for (path, _) in paths.iter() { + if path.amount() >= wot::FULLY_TRUSTED { + log::debug!("{} authenticated!!!", email); if let Ok(cert) = cert_store.lookup_by_cert_fpr(&path.target().fingerprint()) { result.push(cert); }