pingora_openssl::x509::extension

Struct SubjectAlternativeName

Source
pub struct SubjectAlternativeName { /* private fields */ }
Expand description

An extension that allows additional identities to be bound to the subject of the certificate.

Implementations§

Source§

impl SubjectAlternativeName

Source

pub fn new() -> SubjectAlternativeName

Construct a new SubjectAlternativeName extension.

Source

pub fn critical(&mut self) -> &mut SubjectAlternativeName

Sets the critical flag to true. The extension will be critical.

Source

pub fn email(&mut self, email: &str) -> &mut SubjectAlternativeName

Sets the email flag.

Source

pub fn uri(&mut self, uri: &str) -> &mut SubjectAlternativeName

Sets the uri flag.

Source

pub fn dns(&mut self, dns: &str) -> &mut SubjectAlternativeName

Sets the dns flag.

Source

pub fn rid(&mut self, rid: &str) -> &mut SubjectAlternativeName

Sets the rid flag.

Source

pub fn ip(&mut self, ip: &str) -> &mut SubjectAlternativeName

Sets the ip flag.

Source

pub fn dir_name(&mut self, _dir_name: &str) -> &mut SubjectAlternativeName

👎Deprecated: dir_name is deprecated and always panics. Please file a bug if you have a use case for this.

Sets the dirName flag.

Not currently actually supported, always panics.

Source

pub fn other_name(&mut self, _other_name: &str) -> &mut SubjectAlternativeName

👎Deprecated: other_name is deprecated and always panics. Please use other_name2.

Sets the otherName flag.

Not currently actually supported, always panics. Please use other_name2

Source

pub fn other_name2( &mut self, oid: Asn1Object, content: &[u8], ) -> &mut SubjectAlternativeName

Sets the otherName flag.

content must be a valid der encoded ASN1_TYPE

If you want to add just a ia5string use other_name_ia5string

Source

pub fn build( &self, _ctx: &X509v3Context<'_>, ) -> Result<X509Extension, ErrorStack>

Return a SubjectAlternativeName extension as an X509Extension.

Trait Implementations§

Source§

impl Default for SubjectAlternativeName

Source§

fn default() -> SubjectAlternativeName

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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<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> 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, 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.