Enum x509_parser::extensions::ParsedExtension

source ·
pub enum ParsedExtension<'a> {
Show 23 variants UnsupportedExtension { oid: Oid<'a>, }, ParseError { error: Err<BerError>, }, AuthorityKeyIdentifier(AuthorityKeyIdentifier<'a>), SubjectKeyIdentifier(KeyIdentifier<'a>), KeyUsage(KeyUsage), CertificatePolicies(CertificatePolicies<'a>), PolicyMappings(PolicyMappings<'a>), SubjectAlternativeName(SubjectAlternativeName<'a>), IssuerAlternativeName(IssuerAlternativeName<'a>), BasicConstraints(BasicConstraints), NameConstraints(NameConstraints<'a>), PolicyConstraints(PolicyConstraints), ExtendedKeyUsage(ExtendedKeyUsage<'a>), CRLDistributionPoints(CRLDistributionPoints<'a>), InhibitAnyPolicy(InhibitAnyPolicy), AuthorityInfoAccess(AuthorityInfoAccess<'a>), NSCertType(NSCertType), NsCertComment(&'a str), CRLNumber(BigUint), ReasonCode(ReasonCode), InvalidityDate(ASN1Time), SCT(Vec<SignedCertificateTimestamp<'a>>), Unparsed,
}

Variants§

§

UnsupportedExtension

Crate parser does not support this extension (yet)

Fields

§oid: Oid<'a>
§

ParseError

Fields

§error: Err<BerError>
§

AuthorityKeyIdentifier(AuthorityKeyIdentifier<'a>)

Section 4.2.1.1 of rfc 5280

§

SubjectKeyIdentifier(KeyIdentifier<'a>)

Section 4.2.1.2 of rfc 5280

§

KeyUsage(KeyUsage)

Section 4.2.1.3 of rfc 5280

§

CertificatePolicies(CertificatePolicies<'a>)

Section 4.2.1.4 of rfc 5280

§

PolicyMappings(PolicyMappings<'a>)

Section 4.2.1.5 of rfc 5280

§

SubjectAlternativeName(SubjectAlternativeName<'a>)

Section 4.2.1.6 of rfc 5280

§

IssuerAlternativeName(IssuerAlternativeName<'a>)

Section 4.2.1.7 of rfc 5280

§

BasicConstraints(BasicConstraints)

Section 4.2.1.9 of rfc 5280

§

NameConstraints(NameConstraints<'a>)

Section 4.2.1.10 of rfc 5280

§

PolicyConstraints(PolicyConstraints)

Section 4.2.1.11 of rfc 5280

§

ExtendedKeyUsage(ExtendedKeyUsage<'a>)

Section 4.2.1.12 of rfc 5280

§

CRLDistributionPoints(CRLDistributionPoints<'a>)

Section 4.2.1.13 of rfc 5280

§

InhibitAnyPolicy(InhibitAnyPolicy)

Section 4.2.1.14 of rfc 5280

§

AuthorityInfoAccess(AuthorityInfoAccess<'a>)

Section 4.2.2.1 of rfc 5280

§

NSCertType(NSCertType)

Netscape certificate type (subject is SSL client, an SSL server, or a CA)

§

NsCertComment(&'a str)

Netscape certificate comment

§

CRLNumber(BigUint)

Section 5.3.1 of rfc 5280

§

ReasonCode(ReasonCode)

Section 5.3.1 of rfc 5280

§

InvalidityDate(ASN1Time)

Section 5.3.3 of rfc 5280

§

SCT(Vec<SignedCertificateTimestamp<'a>>)

rfc 6962

§

Unparsed

Unparsed extension (was not requested in parsing options)

Implementations§

source§

impl<'a> ParsedExtension<'a>

source

pub fn unsupported(&self) -> bool

Return true if the extension is unsupported

source

pub fn error(&self) -> Option<&Err<BerError>>

Return a reference on the parsing error if the extension parsing failed

Trait Implementations§

source§

impl<'a> Clone for ParsedExtension<'a>

source§

fn clone(&self) -> ParsedExtension<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for ParsedExtension<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> PartialEq for ParsedExtension<'a>

source§

fn eq(&self, other: &ParsedExtension<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> StructuralPartialEq for ParsedExtension<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for ParsedExtension<'a>

§

impl<'a> RefUnwindSafe for ParsedExtension<'a>

§

impl<'a> Send for ParsedExtension<'a>

§

impl<'a> Sync for ParsedExtension<'a>

§

impl<'a> Unpin for ParsedExtension<'a>

§

impl<'a> UnwindSafe for ParsedExtension<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.