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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user