#[non_exhaustive]pub enum Error {
Revoked {
serial: SerialNumber,
reason_code: Option<CrlReason>,
},
CrlExpired,
CrlIssuerMismatch,
CrlSignatureInvalid,
CrlParseError(Error),
OcspSignatureInvalid,
OcspStatusUnknown,
OcspParseError(Error),
OcspMalformed,
CrlSignMissing,
DeltaCrlBaseMismatch,
CrlNumberMismatch,
}Expand description
Errors returned by revocation checking.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Revoked
The certificate has been revoked.
Fields
serial: SerialNumberSerial number of the revoked certificate (for logging/diagnostics).
CrlExpired
The CRL validity window check failed.
This covers two cases:
now < thisUpdate: the CRL is not yet valid (clock skew or future-dated CRL)now > nextUpdate: the CRL has expirednextUpdateabsent: treated as expired (no expiry information means stale)
CrlIssuerMismatch
The CRL issuer name does not match the certificate’s issuer.
The CRL’s issuer field must match the certificate’s issuer field for the
CRL to apply to that certificate. A mismatch indicates the wrong CRL was provided.
CrlSignatureInvalid
The CRL signature did not verify against the issuer’s SPKI.
CrlParseError(Error)
DER decoding of a CRL failed.
OcspSignatureInvalid
An OCSP response signature did not verify against the responder’s key.
OcspStatusUnknown
The OCSP responder returned an unknown status (hard-fail mode).
OcspParseError(Error)
DER decoding of an OCSP response failed.
OcspMalformed
The OCSP response is structurally invalid per RFC 6960 but DER-decodable.
Currently returned in two cases:
responseBytesis absent in aSuccessfulresponse (RFC 6960 §4.2.1)responseTypeis notid-pkix-ocsp-basic(unrecognized response format)
CrlSignMissing
The CRL issuer certificate does not have the cRLSign bit set in KeyUsage
(RFC 5280 §6.3.3(f)).
DeltaCrlBaseMismatch
A delta CRL was supplied but no base CRL is available, or the delta’s
BaseCRLNumber does not match the base CRL’s CRLNumber.
CrlNumberMismatch
The CRL’s CRL number is lower than expected (base CRL must have a number
≥ the delta’s BaseCRLNumber).
Trait Implementations§
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
std only.Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()