Struct CertificateRevocationList

pub struct CertificateRevocationList { /* private fields */ }

Represents a X509 certificate revocation list.

Implementations

impl CertificateRevocationList

fn from_pem(pem: &[u8]) -> Result<CertificateRevocationList>

Parses a PEM encoded CRL.

Examples

# use std::fs::File;
# use std::io::Read;
# fn crl() -> Result<(), Box<dyn std::error::Error>> {
let mut buf = Vec::new();
File::open("my_crl.pem")?
    .read_to_end(&mut buf)?;
let crl = reqwest::tls::CertificateRevocationList::from_pem(&buf)?;
# drop(crl);
# Ok(())
# }

Optional

This requires the rustls(-...) Cargo feature enabled.

fn from_pem_bundle(pem_bundle: &[u8]) -> Result<Vec<CertificateRevocationList>>

Creates a collection of CertificateRevocationLists from a PEM encoded CRL bundle. Example byte sources may be .crl or .pem files.

Examples

# use std::fs::File;
# use std::io::Read;
# fn crls() -> Result<(), Box<dyn std::error::Error>> {
let mut buf = Vec::new();
File::open("crl-bundle.crl")?
    .read_to_end(&mut buf)?;
let crls = reqwest::tls::CertificateRevocationList::from_pem_bundle(&buf)?;
# drop(crls);
# Ok(())
# }

Optional

This requires the rustls(-...) Cargo feature enabled.

Trait Implementations

impl Debug for CertificateRevocationList

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl Freeze for CertificateRevocationList

impl RefUnwindSafe for CertificateRevocationList

impl Send for CertificateRevocationList

impl Sync for CertificateRevocationList

impl Unpin for CertificateRevocationList

impl UnsafeUnpin for CertificateRevocationList

impl UnwindSafe for CertificateRevocationList

Blanket Implementations

impl<T> Any for CertificateRevocationList where T: 'static + ?Sized,

impl<T> Borrow<T> for CertificateRevocationList where T: ?Sized,

impl<T> BorrowMut<T> for CertificateRevocationList where T: ?Sized,

impl<T> From<T> for CertificateRevocationList

impl<T> Instrument for CertificateRevocationList

impl<T> PolicyExt for CertificateRevocationList where T: ?Sized,

impl<T> WithSubscriber for CertificateRevocationList

impl<T, U> Into<U> for CertificateRevocationList where U: From<T>,

impl<T, U> TryFrom<U> for CertificateRevocationList where U: Into<T>,

impl<T, U> TryInto<U> for CertificateRevocationList where U: TryFrom<T>,