[][src]Struct picky::x509::Extension

pub struct Extension { /* fields omitted */ }

Implementations

impl Extension[src]

pub fn extn_id(&self) -> &ObjectIdentifierAsn1[src]

pub fn critical(&self) -> bool[src]

pub fn extn_value(&self) -> ExtensionView<'_>[src]

pub fn into_critical(self) -> Extension[src]

pub fn into_non_critical(self) -> Extension[src]

pub fn set_critical(&mut self, critical: bool)[src]

pub fn new_key_usage(key_usage: KeyUsage) -> Extension[src]

When present, conforming CAs SHOULD mark this extension as critical

Default is critical.

pub fn new_subject_key_identifier<V>(ski: V) -> Extension where
    V: Into<Vec<u8>>, 
[src]

Conforming CAs MUST mark this extension as non-critical

Default is non-critical.

pub fn new_authority_key_identifier<KI, I, SN>(
    key_identifier: KI,
    authority_cert_issuer: I,
    authority_cert_serial_number: SN
) -> Extension where
    I: Into<Option<GeneralName>>,
    KI: Into<Option<OctetStringAsn1>>,
    SN: Into<Option<IntegerAsn1>>, 
[src]

Conforming CAs MUST mark this extension as non-critical

Default is critical.

pub fn new_basic_constraints<CA, PLC>(
    ca: CA,
    path_len_constraints: PLC
) -> Extension where
    CA: Into<Option<bool>>,
    PLC: Into<Option<u8>>, 
[src]

Marking this extension as critical is always acceptable. Check details here: https://tools.ietf.org/html/rfc5280#section-4.2.1.9 You may change this value using into_non_critical or set_critical methods.

Default is critical.

pub fn new_extended_key_usage<EKU>(extended_key_usage: EKU) -> Extension where
    EKU: Into<ExtendedKeyUsage>, 
[src]

This extension MAY, at the option of the certificate issuer, be either critical or non-critical. Conforming CAs SHOULD NOT mark this extension as critical if the anyExtendedKeyUsage KeyPurposeId is present.

Default is non-critical if anyExtendedKeyUsage is present, critical otherwise.

pub fn new_subject_alt_name<N>(name: N) -> Extension where
    N: Into<Asn1SequenceOf<GeneralName>>, 
[src]

If the subject field contains an empty sequence, then the issuing CA MUST include a subjectAltName extension that is marked as critical. When including the subjectAltName extension in a certificate that has a non-empty subject distinguished name, conforming CAs SHOULD mark the subjectAltName extension as non-critical.

Default is critical.

pub fn new_issuer_alt_name<N>(name: N) -> Extension where
    N: Into<Asn1SequenceOf<GeneralName>>, 
[src]

Where present, conforming CAs SHOULD mark this extension as non-critical.

Default is non-critical.

Trait Implementations

impl Clone for Extension[src]

impl Debug for Extension[src]

impl<'de> Deserialize<'de> for Extension[src]

impl PartialEq<Extension> for Extension[src]

impl Serialize for Extension[src]

impl StructuralPartialEq for Extension[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,