Skip to main content

X509CrlBuilder

Struct X509CrlBuilder 

Source
pub struct X509CrlBuilder(/* private fields */);
Expand description

A builder used to construct a version 2 X509Crl.

Implementations§

Source§

impl X509CrlBuilder

Source

pub fn new() -> Result<Self, ErrorStack>

Creates a new builder.

This corresponds to X509_CRL_new.

Source

pub fn set_issuer_name( &mut self, issuer_name: &X509NameRef, ) -> Result<(), ErrorStack>

Set the issuer name of the CRL.

This corresponds to X509_CRL_set_issuer_name.

Source

pub fn set_last_update(&mut self, t: &Asn1TimeRef) -> Result<(), ErrorStack>

Set the lastUpdate (thisUpdate) time indicating when the CRL was issued.

This corresponds to X509_CRL_set1_lastUpdate.

Source

pub fn set_next_update(&mut self, t: &Asn1TimeRef) -> Result<(), ErrorStack>

Set the nextUpdate timestamp indicating when a newer CRL is expected.

This corresponds to X509_CRL_set1_nextUpdate.

Source

pub fn append_extension( &mut self, extension: X509Extension, ) -> Result<(), ErrorStack>

Add an X509 extension value to the CRL.

This works just as append_extension except it takes ownership of the X509Extension.

Source

pub fn append_extension2( &mut self, extension: &X509ExtensionRef, ) -> Result<(), ErrorStack>

Add an X509 extension value to the CRL.

This corresponds to X509_CRL_add_ext.

Source

pub fn add_revoked(&mut self, revoked: X509Revoked) -> Result<(), ErrorStack>

Add a revoked certificate to the CRL.

This corresponds to X509_CRL_add0_revoked.

Source

pub fn sort(&mut self) -> Result<(), ErrorStack>

Sort the CRL.

This corresponds to X509_CRL_sort.

Source

pub fn sign<T>( &mut self, key: &PKeyRef<T>, hash: MessageDigest, ) -> Result<(), ErrorStack>
where T: HasPrivate,

Signs the CRL with a private key.

This corresponds to X509_CRL_sign.

Source

pub fn build(self) -> Result<X509Crl, ErrorStack>

Consumes the builder, returning the CRL.

§Panics

Panics if any of nextUpdate, revoked, AuthorityKeyIdentifier or CrlNumber is missing

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.