pub struct RevocationOptionsBuilder<'a> {
crls: &'a [&'a CertRevocationList<'a>],
depth: RevocationCheckDepth,
status_policy: UnknownStatusPolicy,
expiration_policy: ExpirationPolicy,
}
Expand description
Builds a RevocationOptions instance to control how revocation checking is performed.
Fields§
§crls: &'a [&'a CertRevocationList<'a>]
§depth: RevocationCheckDepth
§status_policy: UnknownStatusPolicy
§expiration_policy: ExpirationPolicy
Implementations§
Source§impl<'a> RevocationOptionsBuilder<'a>
impl<'a> RevocationOptionsBuilder<'a>
Sourcepub fn new(crls: &'a [&'a CertRevocationList<'a>]) -> Result<Self, CrlsRequired>
pub fn new(crls: &'a [&'a CertRevocationList<'a>]) -> Result<Self, CrlsRequired>
Create a builder that will perform revocation checking using the provided certificate revocation lists (CRLs). At least one CRL must be provided.
Use RevocationOptionsBuilder::build to create a RevocationOptions instance.
By default revocation checking will be performed on both the end-entity (leaf) certificate and intermediate certificates. This can be customized using the RevocationOptionsBuilder::with_depth method.
By default revocation checking will fail if the revocation status of a certificate cannot be determined. This can be customized using the RevocationOptionsBuilder::with_status_policy method.
By default revocation checking will not fail if the verification time is beyond the time in the CRL nextUpdate field. This can be customized using the RevocationOptionsBuilder::with_expiration_policy method.
Sourcepub fn with_depth(self, depth: RevocationCheckDepth) -> Self
pub fn with_depth(self, depth: RevocationCheckDepth) -> Self
Customize the depth at which revocation checking will be performed, controlling whether only the end-entity (leaf) certificate in the chain to a trust anchor will have its revocation status checked, or whether the intermediate certificates will as well.
Sourcepub fn with_status_policy(self, policy: UnknownStatusPolicy) -> Self
pub fn with_status_policy(self, policy: UnknownStatusPolicy) -> Self
Customize whether unknown revocation status is an error, or permitted.
Sourcepub fn with_expiration_policy(self, policy: ExpirationPolicy) -> Self
pub fn with_expiration_policy(self, policy: ExpirationPolicy) -> Self
Customize whether the CRL nextUpdate field (i.e. expiration) is enforced.
Sourcepub fn build(self) -> RevocationOptions<'a>
pub fn build(self) -> RevocationOptions<'a>
Construct a RevocationOptions instance based on the builder’s configuration.
Trait Implementations§
Source§impl<'a> Clone for RevocationOptionsBuilder<'a>
impl<'a> Clone for RevocationOptionsBuilder<'a>
Source§fn clone(&self) -> RevocationOptionsBuilder<'a>
fn clone(&self) -> RevocationOptionsBuilder<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more