[]Struct openssl::ssl::SslSession

pub struct SslSession(_);
[]

An encoded SSL session.

These can be cached to share sessions across connections.

Methods

impl SslSession[src][]

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

Deserializes a DER-encoded session structure.

This corresponds to d2i_SSL_SESSION.

Methods from Deref<Target = SslSessionRef>

pub fn id(&self) -> &[u8][src][]

Returns the SSL session ID.

This corresponds to SSL_SESSION_get_id.

pub fn master_key_len(&self) -> usize[src][]

Returns the length of the master key.

This corresponds to SSL_SESSION_get_master_key.

pub fn master_key(&self, buf: &mut [u8]) -> usize[src][]

Copies the master key into the provided buffer.

Returns the number of bytes written, or the size of the master key if the buffer is empty.

This corresponds to SSL_SESSION_get_master_key.

pub fn time(&self) -> i64[src][]

Returns the time at which the session was established, in seconds since the Unix epoch.

This corresponds to SSL_SESSION_get_time.

pub fn timeout(&self) -> i64[src][]

Returns the sessions timeout, in seconds.

A session older than this time should not be used for session resumption.

This corresponds to SSL_SESSION_get_timeout.

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

Serializes the session into a DER-encoded structure.

This corresponds to i2d_SSL_SESSION.

Trait Implementations

impl Sync for SslSession[src]

impl AsRef<SslSessionRef> for SslSession[+]

impl Clone for SslSession[src][+]

fn clone_from(&mut self, source: &Self)
1.0.0
[src][]

Performs copy-assignment from source. Read more

impl Send for SslSession[src]

impl Drop for SslSession[+]

impl DerefMut for SslSession[+]

impl Deref for SslSession[+]

type Target = SslSessionRef

The resulting type after dereferencing.

impl Borrow<SslSessionRef> for SslSession[+]

impl ForeignType for SslSession[+]

type CType = SSL_SESSION

The raw C type.

type Ref = SslSessionRef

The type representing a reference to this type.

Blanket Implementations

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

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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