#[non_exhaustive]pub enum Error {
SignatureInvalid {
index: usize,
},
MalformedCertificate {
index: usize,
},
ValidityPeriod {
index: usize,
},
ChainBroken {
index: usize,
},
NoTrustedPath,
PathTooLong,
NotCA {
index: usize,
},
KeyUsageMissing {
index: usize,
},
UnhandledCriticalExtension {
index: usize,
},
Der(Error),
}Expand description
Errors returned by path validation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SignatureInvalid
Certificate signature verification failed at the given chain index.
MalformedCertificate
A structural encoding error was found in a certificate.
Currently returned when the outer signatureAlgorithm field differs from
the inner TBSCertificate.signature field (RFC 5280 §4.1.1.2).
ValidityPeriod
Certificate validity period check failed (expired or not yet valid).
ChainBroken
Issuer/subject name linkage is broken at the given chain index.
NoTrustedPath
No path from the subject certificate to any trust anchor was found.
PathTooLong
Path length exceeds ValidationPolicy::max_path_len.
NotCA
An intermediate certificate is missing BasicConstraints cA=TRUE.
KeyUsageMissing
An intermediate certificate is missing KeyUsage keyCertSign.
UnhandledCriticalExtension
A critical extension is present that this implementation does not handle.
Der(Error)
ASN.1 / DER decoding error.
Returned when DER encoding of a TBS structure fails inside chain_walk
(e.g. the TBS is too large for the internal stack buffer). The inner
der::Error is exposed for diagnostic purposes; callers that want a
stable match target should check for Error::Der(_) without inspecting
the inner value, as the specific der::Error variants are not part of
the stable API contract.
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()