Struct webpki::RevocationOptionsBuilder
source · pub struct RevocationOptionsBuilder<'a> { /* private fields */ }
Expand description
Builds a RevocationOptions instance to control how revocation checking is performed.
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 moresource§impl<'a> Debug for RevocationOptionsBuilder<'a>
impl<'a> Debug for RevocationOptionsBuilder<'a>
impl<'a> Copy for RevocationOptionsBuilder<'a>
Auto Trait Implementations§
impl<'a> Freeze for RevocationOptionsBuilder<'a>
impl<'a> RefUnwindSafe for RevocationOptionsBuilder<'a>
impl<'a> Send for RevocationOptionsBuilder<'a>
impl<'a> Sync for RevocationOptionsBuilder<'a>
impl<'a> Unpin for RevocationOptionsBuilder<'a>
impl<'a> UnwindSafe for RevocationOptionsBuilder<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)