Fix bug in get_local_certifcates

- Use the trust amount of the whole path instead of just the last link.
This commit is contained in:
Malte Meiboom
2026-05-12 11:18:42 +02:00
parent 25c7da79ce
commit 0df4c723d9
+3 -3
View File
@@ -88,9 +88,9 @@ pub fn get_local_certificates<'hc>(context: &HuskContext<'hc>, email: &str)
for (fpr, some_userid) in bindings { for (fpr, some_userid) in bindings {
if let Some(userid) = some_userid { if let Some(userid) = some_userid {
let paths = n.authenticate(userid, &fpr, wot::FULLY_TRUSTED); let paths = n.authenticate(userid, &fpr, wot::FULLY_TRUSTED);
if !paths.is_empty() { for (path, _) in paths.iter() {
log::debug!("{} authenticated!!!", email); if path.amount() >= wot::FULLY_TRUSTED {
for (path, _) in paths.iter() { log::debug!("{} authenticated!!!", email);
if let Ok(cert) = cert_store.lookup_by_cert_fpr(&path.target().fingerprint()) { if let Ok(cert) = cert_store.lookup_by_cert_fpr(&path.target().fingerprint()) {
result.push(cert); result.push(cert);
} }