[][src]Struct udp_dtls::Certificate

pub struct Certificate(pub X509);

A wrapper type for an X509 certificate.

Methods

impl Certificate[src]

pub fn from_der(buf: &[u8]) -> Result<Certificate, Error>[src]

Deserializes a DER-encoded X509 structure.

Underlying SSL

This corresponds to d2i_X509.

pub fn from_pem(buf: &[u8]) -> Result<Certificate, Error>[src]

Deserializes a PEM-encoded X509 structure.

The input should have a header of -----BEGIN CERTIFICATE-----.

Underlying SSL

This corresponds to PEM_read_bio_X509.

pub fn to_der(&self) -> Result<Vec<u8>, Error>[src]

Serializes the certificate into a DER-encoded X509 structure.

Underlying SSL

This corresponds to i2d_X509.

pub fn fingerprint(
    &self,
    signature_algorithm: SignatureAlgorithm
) -> Result<CertificateFingerprint, Error>
[src]

Returns the digest of the DER representation of the certificate and the cryptographic hash function used to calculate those bytes.

Underlying SSL

The bytes are a digest of the DER representation of the certificate.

The bytes are calculated by the X509_digest function.

Trait Implementations

impl Clone for Certificate[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]