pub struct OcspCheck;Expand description
Stateless OCSP checker. Holds no configuration; the caller selects a fetcher and clock per call.
Implementations§
Source§impl OcspCheck
impl OcspCheck
Sourcepub fn query(
cert: &X509Cert,
issuer: &X509Cert,
fetcher: &dyn OcspFetcher,
ocsp_url: &str,
now_unix_seconds: i64,
) -> Result<OcspStatus, BridgeError>
pub fn query( cert: &X509Cert, issuer: &X509Cert, fetcher: &dyn OcspFetcher, ocsp_url: &str, now_unix_seconds: i64, ) -> Result<OcspStatus, BridgeError>
Run an OCSP query for cert (issued by issuer). The fetcher
returns DER for an OCSPResponse; we parse it, sanity-check the
thisUpdate/nextUpdate window against now_unix_seconds, and
extract the status for the first SingleResponse.
Sourcepub fn parse_response(
der: &[u8],
now_unix_seconds: i64,
) -> Result<OcspStatus, OcspError>
pub fn parse_response( der: &[u8], now_unix_seconds: i64, ) -> Result<OcspStatus, OcspError>
Pure parser: walks the DER tree, validates the time window, and
returns the status of the first SingleResponse. Exposed for
testing.
Auto Trait Implementations§
impl Freeze for OcspCheck
impl RefUnwindSafe for OcspCheck
impl Send for OcspCheck
impl Sync for OcspCheck
impl Unpin for OcspCheck
impl UnsafeUnpin for OcspCheck
impl UnwindSafe for OcspCheck
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> 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