Struct openssl::x509::X509 [] [src]

pub struct X509(_);

An owned public key certificate.

Methods

impl X509
[src]

unsafe fn from_ptr(x509: *mut X509) -> X509

Returns a new X509, taking ownership of the handle.

unsafe fn new(x509: *mut X509) -> X509

Deprecated since 0.8.1

: renamed to X509::from_ptr

fn from_der(buf: &[u8]) -> Result<X509ErrorStack>

Reads a certificate from DER.

fn from_pem(buf: &[u8]) -> Result<X509ErrorStack>

Reads a certificate from PEM.

Methods from Deref<Target=X509Ref<'static>>

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 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

Trait Implementations

impl Deref for X509
[src]

type Target = X509Ref<'static>

The resulting type after dereferencing

fn deref(&self) -> &X509Ref<'static>

The method called to dereference a value

impl Drop for X509
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more