pub struct CrlStore { /* private fields */ }Expand description
An in-memory CRL (Certificate Revocation List) store.
For production deployments, the TLS layer should handle CRL/OCSP. This provides an application-layer defence-in-depth check against known-revoked serial numbers.
Implementations§
Source§impl CrlStore
impl CrlStore
Sourcepub fn add_revoked(&self, issuer_dn: &str, serial_hex: &str)
pub fn add_revoked(&self, issuer_dn: &str, serial_hex: &str)
Mark a certificate serial number as revoked for a given issuer DN.
Sourcepub fn check(&self, issuer_dn: &str, serial_hex: &str) -> RevocationStatus
pub fn check(&self, issuer_dn: &str, serial_hex: &str) -> RevocationStatus
Check if a certificate (by issuer DN and serial hex) is revoked.
Sourcepub fn check_der(&self, cert_der: &[u8]) -> RevocationStatus
pub fn check_der(&self, cert_der: &[u8]) -> RevocationStatus
Check a DER-encoded certificate against the CRL store.
Sourcepub fn revoked_count(&self) -> usize
pub fn revoked_count(&self) -> usize
Total count of revoked serial numbers across all issuers.
Sourcepub fn clear_issuer(&self, issuer_dn: &str)
pub fn clear_issuer(&self, issuer_dn: &str)
Remove all entries for an issuer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CrlStore
impl RefUnwindSafe for CrlStore
impl Send for CrlStore
impl Sync for CrlStore
impl Unpin for CrlStore
impl UnsafeUnpin for CrlStore
impl UnwindSafe for CrlStore
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more