pub struct RevocationChecker { /* private fields */ }Available on crate features
signatures and ocsp only.Expand description
Certificate revocation checker.
This provides methods for checking certificate revocation status using OCSP and CRL protocols.
Implementations§
Source§impl RevocationChecker
impl RevocationChecker
Sourcepub fn new() -> Result<Self, Error>
pub fn new() -> Result<Self, Error>
Create a new revocation checker with default configuration.
§Errors
Returns an error if the HTTP client cannot be initialized.
Sourcepub fn with_config(config: RevocationConfig) -> Result<Self, Error>
pub fn with_config(config: RevocationConfig) -> Result<Self, Error>
Create a new revocation checker with custom configuration.
§Errors
Returns an error if the HTTP client cannot be initialized.
Sourcepub async fn check_ocsp(
&self,
cert_der: &[u8],
issuer_der: &[u8],
) -> Result<RevocationResult, Error>
pub async fn check_ocsp( &self, cert_der: &[u8], issuer_der: &[u8], ) -> Result<RevocationResult, Error>
Sourcepub async fn check(
&self,
cert_der: &[u8],
issuer_der: Option<&[u8]>,
) -> Result<RevocationResult, Error>
pub async fn check( &self, cert_der: &[u8], issuer_der: Option<&[u8]>, ) -> Result<RevocationResult, Error>
Check certificate revocation status using the preferred method.
Tries OCSP first if configured, falls back to CRL.
§Arguments
cert_der- DER-encoded certificate to checkissuer_der- DER-encoded issuer certificate (for OCSP)
§Returns
The revocation status of the certificate.
§Errors
Returns an error if all revocation checks fail.
Sourcepub fn config(&self) -> &RevocationConfig
pub fn config(&self) -> &RevocationConfig
Get the current configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RevocationChecker
impl !RefUnwindSafe for RevocationChecker
impl Send for RevocationChecker
impl Sync for RevocationChecker
impl Unpin for RevocationChecker
impl UnsafeUnpin for RevocationChecker
impl !UnwindSafe for RevocationChecker
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
Mutably borrows from an owned value. Read more