Start milestone 3
- Add functionality to query online sources (Keyservers, etc) for certificates. - Use introducers to determine which UserIDs should be fetched from online soources. Check certifications before importing certifiactes into the local cert store. - start docker image for local end-to-end testing.
This commit is contained in:
@@ -29,5 +29,29 @@ impl Introducer {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_introducing(&self, cert: &Cert) -> bool {
|
||||
|
||||
let policy = StandardPolicy::new();
|
||||
let mut result = false;
|
||||
|
||||
let my_keyid = self.cert.keyid();
|
||||
|
||||
if let Ok(vc) = cert.with_policy(&policy, None) {
|
||||
vc.userids()
|
||||
.revoked(false)
|
||||
.for_each(|u| {
|
||||
u.certifications().for_each(|s| {
|
||||
if s.signature_alive(None, None).is_ok() {
|
||||
s.issuers().for_each(|i| {
|
||||
if i == &my_keyid { result = true; }
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user