pub enum X509Error {
Show 22 variants
Generic,
InvalidVersion,
InvalidSerial,
InvalidAlgorithmIdentifier,
InvalidX509Name,
InvalidDate,
InvalidSPKI,
InvalidSubjectUID,
InvalidIssuerUID,
InvalidExtensions,
InvalidAttributes,
DuplicateExtensions,
DuplicateAttributes,
InvalidSignatureValue,
InvalidTbsCertificate,
InvalidUserCertificate,
InvalidCertificate,
SignatureVerificationError,
SignatureUnsupportedAlgorithm,
InvalidNumber,
Der(Error),
NomError(ErrorKind),
}
Expand description
An error that can occur while parsing or validating a certificate.
Variants§
Generic
InvalidVersion
InvalidSerial
InvalidAlgorithmIdentifier
InvalidX509Name
InvalidDate
InvalidSPKI
InvalidSubjectUID
InvalidIssuerUID
InvalidExtensions
InvalidAttributes
DuplicateExtensions
DuplicateAttributes
InvalidSignatureValue
InvalidTbsCertificate
InvalidUserCertificate
InvalidCertificate
Top-level certificate structure is invalid
SignatureVerificationError
SignatureUnsupportedAlgorithm
InvalidNumber
Der(Error)
NomError(ErrorKind)
Trait Implementations§
§impl Error for X509Error
impl Error for X509Error
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
§impl<'a> FromDer<'a, X509Error> for TbsCertificate<'a>
impl<'a> FromDer<'a, X509Error> for TbsCertificate<'a>
§fn from_der(
i: &'a [u8]
) -> Result<(&'a [u8], TbsCertificate<'a>), Err<X509Error>>
fn from_der( i: &'a [u8] ) -> Result<(&'a [u8], TbsCertificate<'a>), Err<X509Error>>
Parse a DER-encoded TbsCertificate object
TBSCertificate ::= SEQUENCE { version [0] Version DEFAULT v1, serialNumber CertificateSerialNumber, signature AlgorithmIdentifier, issuer Name, validity Validity, subject Name, subjectPublicKeyInfo SubjectPublicKeyInfo, issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL, -- If present, version MUST be v2 or v3 subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL, -- If present, version MUST be v2 or v3 extensions [3] Extensions OPTIONAL -- If present, version MUST be v3 -- }
§impl<I> ParseError<I> for X509Error
impl<I> ParseError<I> for X509Error
§fn from_error_kind(_input: I, kind: ErrorKind) -> X509Error
fn from_error_kind(_input: I, kind: ErrorKind) -> X509Error
Creates an error from the input position and an [ErrorKind]
§fn append(_input: I, kind: ErrorKind, _other: X509Error) -> X509Error
fn append(_input: I, kind: ErrorKind, _other: X509Error) -> X509Error
Combines an existing error with a new one created from the input
position and an [ErrorKind]. This is useful when backtracking
through a parse tree, accumulating error context on the way
impl StructuralPartialEq for X509Error
Auto Trait Implementations§
impl RefUnwindSafe for X509Error
impl Send for X509Error
impl Sync for X509Error
impl Unpin for X509Error
impl UnwindSafe for X509Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§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