Struct openssl::x509::X509Ref [] [src]

pub struct X509Ref<'a>(_, _);

A borrowed public key certificate.

Methods

impl<'a> X509Ref<'a>
[src]

unsafe fn from_ptr(x509: *mut X509) -> X509Ref<'a>

Creates a new X509Ref wrapping the provided handle.

unsafe fn new(x509: *mut X509) -> X509Ref<'a>

Deprecated since 0.8.1

: renamed to X509::from_ptr

fn as_ptr(&self) -> *mut X509

fn subject_name<'b>(&'b self) -> X509Name<'b>

fn subject_alt_names<'b>(&'b self) -> Option<GeneralNames<'b>>

Returns this certificate's SAN entries, if they exist.

fn public_key(&self) -> Result<PKeyErrorStack>

fn fingerprint(&self, hash_type: Type) -> Result<Vec<u8>, ErrorStack>

Returns certificate fingerprint calculated using provided hash

fn not_after<'b>(&'b self) -> Asn1TimeRef<'b>

Returns certificate Not After validity period. Requires the x509_expiry feature.

fn not_before<'b>(&'b self) -> Asn1TimeRef<'b>

Returns certificate Not Before validity period. Requires the x509_expiry feature.

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

Writes certificate as PEM

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

Returns a DER serialized form of the certificate