Struct Builder

Source
pub struct Builder<'a> { /* private fields */ }
Available on crate feature x509 only.

Implementations§

Source§

impl<'a> Builder<'a>

Source

pub fn new() -> Self

Source§

impl<'a> Builder<'a>

Source

pub fn subject(&mut self, subject: &str) -> Result<&mut Self>

Available on crate feature std only.
Source

pub fn subject_with_nul(&mut self, subject: &str) -> Result<&mut Self>

Source

pub fn issuer(&mut self, issuer: &str) -> Result<&mut Self>

Available on crate feature std only.
Source

pub fn issuer_with_nul(&mut self, issuer: &str) -> Result<&mut Self>

Source

pub fn subject_key(&mut self, key: &'a mut Pk) -> &mut Self

Source

pub fn issuer_key(&mut self, key: &'a mut Pk) -> &mut Self

Source

pub fn signature_hash(&mut self, md: MdType) -> &mut Self

Source

pub fn key_usage(&mut self, usage: KeyUsage) -> Result<&mut Self>

Source

pub fn extension( &mut self, oid: &[u8], val: &[u8], critical: bool, ) -> Result<&mut Self>

Source

pub fn basic_constraints( &mut self, ca: bool, pathlen: Option<u32>, ) -> Result<&mut Self>

Source

pub fn validity( &mut self, not_before: Time, not_after: Time, ) -> Result<&mut Self>

Source

pub fn serial(&mut self, serial: &[u8]) -> Result<&mut Self>

Source

pub fn write_der<'buf, F: Random>( &mut self, buf: &'buf mut [u8], rng: &mut F, ) -> Result<Option<&'buf [u8]>>

Source

pub fn write_der_vec<F: Random>(&mut self, rng: &mut F) -> Result<Vec<u8>>

Source

pub fn write_pem<'buf, F: Random>( &mut self, buf: &'buf mut [u8], rng: &mut F, ) -> Result<Option<&'buf [u8]>>

Source

pub fn write_pem_string<F: Random>(&mut self, rng: &mut F) -> Result<String>

Trait Implementations§

Source§

impl<'a> Drop for Builder<'a>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a> Send for Builder<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Builder<'a>

§

impl<'a> RefUnwindSafe for Builder<'a>

§

impl<'a> !Sync for Builder<'a>

§

impl<'a> Unpin for Builder<'a>

§

impl<'a> UnwindSafe for Builder<'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<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.