#[non_exhaustive]pub enum OutOfScopeReason {
CrlOnlyAttributeCerts,
CrlOnlyUserCerts,
CrlOnlyCaCerts,
CrlIdpDistributionPointMismatch,
}Expand description
Reason a revocation check produced no determination.
Carried by Error::OutOfScope to identify which scope-mismatch case the
checker hit. Distinct from Crl*Error (parse / signature / validity
failures): an OutOfScope outcome is structurally well-formed but the
revocation source’s stated scope excludes the certificate being checked.
Hard-fail callers should treat any OutOfScope as a failure (no
revocation determination was made). Soft-fail callers can match on the
reason and decide which scopes to tolerate (for example, treating
CrlOnlyAttributeCerts as “expected and tolerable” while still hard-failing
on CrlOnlyCaCerts when checking a CA certificate).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CrlOnlyAttributeCerts
The CRL’s IssuingDistributionPoint extension has
onlyContainsAttributeCerts = true. Attribute-certificate revocation
is out of scope for pkix-revocation (RFC 5755 attribute certificates
are handled by pkix-ac); the certificate being checked is a public-key
certificate, so the CRL cannot apply.
CrlOnlyUserCerts
The CRL’s IssuingDistributionPoint extension has
onlyContainsUserCerts = true but the certificate being checked is a
CA certificate (BasicConstraints cA = TRUE).
CrlOnlyCaCerts
The CRL’s IssuingDistributionPoint extension has
onlyContainsCACerts = true but the certificate being checked is not a
CA certificate.
CrlIdpDistributionPointMismatch
The CRL’s IssuingDistributionPoint distributionPoint field does
not match (or is incompatible with) any of the certificate’s
cRLDistributionPoints extension entries (RFC 5280 §6.3.3(b)(1)).
This case covers two sub-conditions, which are not distinguished in the public API to avoid leaking implementation detail:
- The CRL’s IDP names a specific distribution point but the
certificate carries no
cRLDistributionPointsextension at all. - Both sides name distribution points but no entry in the certificate’s CDP resolves to a name that intersects the IDP’s distributionPoint name.
Hard-fail callers should treat this exactly like the other
OutOfScope reasons: the CRL is structurally well-formed but does
not cover the certificate, and a separate CRL/OCSP source must be
consulted.
Trait Implementations§
Source§impl Clone for OutOfScopeReason
impl Clone for OutOfScopeReason
Source§fn clone(&self) -> OutOfScopeReason
fn clone(&self) -> OutOfScopeReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OutOfScopeReason
Source§impl Debug for OutOfScopeReason
impl Debug for OutOfScopeReason
Source§impl<'de> Deserialize<'de> for OutOfScopeReason
impl<'de> Deserialize<'de> for OutOfScopeReason
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for OutOfScopeReason
impl Display for OutOfScopeReason
impl Eq for OutOfScopeReason
Source§impl Hash for OutOfScopeReason
impl Hash for OutOfScopeReason
Source§impl PartialEq for OutOfScopeReason
impl PartialEq for OutOfScopeReason
Source§fn eq(&self, other: &OutOfScopeReason) -> bool
fn eq(&self, other: &OutOfScopeReason) -> bool
self and other values to be equal, and is used by ==.