X509Crl

Struct X509Crl 

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

An X.509 certificate revocation list (X509_CRL*).

Cloneable via X509_CRL_up_ref.

Implementations§

Source§

impl X509Crl

Source

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

Allocate a new, empty X509_CRL structure.

The returned CRL has no fields set. Use this when constructing a CRL programmatically before populating its fields via the OpenSSL API.

§Errors

Returns Err if OpenSSL cannot allocate the structure.

Source

pub fn new_in(ctx: &Arc<LibCtx>) -> Result<Self, ErrorStack>

Allocate a new, empty X509_CRL structure bound to a library context.

Equivalent to X509_CRL_new_ex(ctx, NULL). The CRL will use providers from ctx for any cryptographic operations performed on it.

§Errors

Returns Err if OpenSSL cannot allocate the structure.

Source

pub fn from_pem(pem: &[u8]) -> Result<Self, ErrorStack>

Load a CRL from PEM bytes.

§Errors
Source

pub fn from_der(der: &[u8]) -> Result<Self, ErrorStack>

Load a CRL from DER bytes.

§Errors
Source

pub fn to_pem(&self) -> Result<Vec<u8>, ErrorStack>

Serialise the CRL to PEM.

§Errors
Source

pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>

Serialise the CRL to DER.

§Errors
Source

pub fn issuer_name(&self) -> X509Name<'_>

Issuer distinguished name (borrowed).

Source

pub fn last_update_str(&self) -> Option<String>

thisUpdate field as a human-readable string.

Source

pub fn next_update_str(&self) -> Option<String>

nextUpdate field as a human-readable string.

Source

pub fn verify(&self, key: &Pkey<Public>) -> Result<bool, ErrorStack>

Verify this CRL was signed by key.

Returns Ok(true) if valid, Ok(false) if not.

§Errors

Trait Implementations§

Source§

impl Clone for X509Crl

Source§

fn clone(&self) -> Self

Returns a duplicate 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 Drop for X509Crl

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for X509Crl

Source§

impl Sync for X509Crl

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.