Struct sequoia_wot::store::KeyServer
source · pub struct KeyServer<'a, B>where
B: Backend,{ /* private fields */ }
Expand description
Attempts to fetch certificates from a keyserver.
Implementations§
source§impl<'a, B> KeyServer<'a, B>where
B: Backend,
impl<'a, B> KeyServer<'a, B>where
B: Backend,
sourcepub fn new(
keyserver: KeyServer,
backend: B,
policy: &'a dyn Policy,
reference_time: SystemTime
) -> Result<Self>
pub fn new(
keyserver: KeyServer,
backend: B,
policy: &'a dyn Policy,
reference_time: SystemTime
) -> Result<Self>
Returns a new KeyServer
.
When looking up certificates by Key ID or fingerprint, this first looks up the certificate in the underlying backend. If no certificate is found, then it looks up the certificate on the configured key server.
When looking up certificates by User ID or by email address
(using Store::with_userid
or Store::with_email
), this
simultaneously checks the corresponding WKD (if any), the
configured key server, and the underlying backend. The
results are merged and cached.
Trait Implementations§
source§impl<'a, B> Backend for KeyServer<'a, B>where
B: Backend,
impl<'a, B> Backend for KeyServer<'a, B>where
B: Backend,
source§fn cert_object<'b>(&'b self, kh: &KeyHandle) -> Result<Vec<CertObject<'b>>>
fn cert_object<'b>(&'b self, kh: &KeyHandle) -> Result<Vec<CertObject<'b>>>
Returns the certificates matching the handle. Read more
source§fn list_cert_objects<'b>(&'b self) -> Box<dyn Iterator<Item = Fingerprint> + 'b>
fn list_cert_objects<'b>(&'b self) -> Box<dyn Iterator<Item = Fingerprint> + 'b>
Lists all of the certificates.
source§fn precompute(&self)
fn precompute(&self)
Prefills the cache. Read more
source§fn cert_object_by_fpr<'a>(
&'a self,
fingerprint: &Fingerprint
) -> Result<CertObject<'a>>
fn cert_object_by_fpr<'a>(
&'a self,
fingerprint: &Fingerprint
) -> Result<CertObject<'a>>
Returns the corresponding certificate, if any. Read more
source§fn cert_objects<'a>(&'a self) -> Box<dyn Iterator<Item = CertObject<'a>> + 'a>
fn cert_objects<'a>(&'a self) -> Box<dyn Iterator<Item = CertObject<'a>> + 'a>
Returns all of the certificates. Read more
source§impl<'a, B> Store for KeyServer<'a, B>where
B: Backend + Store,
impl<'a, B> Store for KeyServer<'a, B>where
B: Backend + Store,
source§fn reference_time(&self) -> SystemTime
fn reference_time(&self) -> SystemTime
Returns the reference time.
source§fn list<'b>(&'b self) -> Box<dyn Iterator<Item = Fingerprint> + 'b>
fn list<'b>(&'b self) -> Box<dyn Iterator<Item = Fingerprint> + 'b>
Lists all of the certificates.
source§fn cert(&self, kh: &KeyHandle) -> Result<Vec<CertSynopsis>>
fn cert(&self, kh: &KeyHandle) -> Result<Vec<CertSynopsis>>
Returns the certificates matching the handle. Read more
source§fn certifications_of(
&self,
target: &Fingerprint,
min_depth: Depth
) -> Result<Vec<CertificationSet>>
fn certifications_of(
&self,
target: &Fingerprint,
min_depth: Depth
) -> Result<Vec<CertificationSet>>
Returns a certification set for the specified certificate. Read more
source§fn with_userid(&self, userid: UserID) -> Vec<Fingerprint> ⓘ
fn with_userid(&self, userid: UserID) -> Vec<Fingerprint> ⓘ
Returns all certificates that may have the specified User ID. Read more
source§fn with_email(&self, email: &str) -> Vec<(Fingerprint, UserID)> ⓘ
fn with_email(&self, email: &str) -> Vec<(Fingerprint, UserID)> ⓘ
Returns all certificates that may have a User ID with the
specified email address. Read more
source§fn certs<'a>(&'a self) -> Box<dyn Iterator<Item = CertSynopsis> + 'a>
fn certs<'a>(&'a self) -> Box<dyn Iterator<Item = CertSynopsis> + 'a>
Returns all of the certificates.
source§fn cert_by_fpr(&self, fingerprint: &Fingerprint) -> Result<CertSynopsis>
fn cert_by_fpr(&self, fingerprint: &Fingerprint) -> Result<CertSynopsis>
Returns the corresponding certificate, if any. Read more
source§fn third_party_certifications_of(&self, fpr: &Fingerprint) -> Vec<Certification> ⓘ
fn third_party_certifications_of(&self, fpr: &Fingerprint) -> Vec<Certification> ⓘ
Returns all third-party certifications of the specified
certificate. Read more
source§fn certified_userids_of(&self, fpr: &Fingerprint) -> Vec<UserID> ⓘ
fn certified_userids_of(&self, fpr: &Fingerprint) -> Vec<UserID> ⓘ
Returns all User IDs that were certified for the specified
certificate. Read more
source§fn certified_userids(&self) -> Vec<(Fingerprint, UserID)> ⓘ
fn certified_userids(&self) -> Vec<(Fingerprint, UserID)> ⓘ
Returns all User IDs that were certified. Read more