Struct openssl::ssl::SslSession [−]
pub struct SslSession(_);
An encoded SSL session.
These can be cached to share sessions across connections.
Methods
impl SslSession
[src]
impl SslSession
pub fn from_der(der: &[u8]) -> Result<SslSession, ErrorStack>
[src]
pub fn from_der(der: &[u8]) -> Result<SslSession, ErrorStack>
Deserializes a DER-encoded session structure.
This corresponds to d2i_SSL_SESSION
.
Methods from Deref<Target = SslSessionRef>
pub fn id(&self) -> &[u8]
[src]
pub fn id(&self) -> &[u8]
Returns the SSL session ID.
This corresponds to SSL_SESSION_get_id
.
pub fn master_key_len(&self) -> usize
[src]
pub fn master_key_len(&self) -> usize
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]
pub fn master_key(&self, buf: &mut [u8]) -> usize
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 max_early_data(&self) -> u32
[src]
pub fn max_early_data(&self) -> u32
Gets the maximum amount of early data that can be sent on this session.
Requires OpenSSL 1.1.1 or newer.
This corresponds to SSL_SESSION_get_max_early_data
.
pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
[src]
pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
Serializes the session into a DER-encoded structure.
This corresponds to i2d_SSL_SESSION
.
Trait Implementations
impl ForeignType 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.
unsafe fn from_ptr(ptr: *mut SSL_SESSION) -> SslSession
unsafe fn from_ptr(ptr: *mut SSL_SESSION) -> SslSession
Constructs an instance of this type from its raw type.
fn as_ptr(&self) -> *mut SSL_SESSION
fn as_ptr(&self) -> *mut SSL_SESSION
Returns a raw pointer to the wrapped value.
impl Drop for SslSession
impl Drop for SslSession
impl Deref for SslSession
impl Deref for SslSession
type Target = SslSessionRef
The resulting type after dereferencing.
fn deref(&self) -> &SslSessionRef
fn deref(&self) -> &SslSessionRef
Dereferences the value.
impl DerefMut for SslSession
impl DerefMut for SslSession
fn deref_mut(&mut self) -> &mut SslSessionRef
fn deref_mut(&mut self) -> &mut SslSessionRef
Mutably dereferences the value.
impl Borrow<SslSessionRef> for SslSession
impl Borrow<SslSessionRef> for SslSession
fn borrow(&self) -> &SslSessionRef
fn borrow(&self) -> &SslSessionRef
Immutably borrows from an owned value. Read more
impl AsRef<SslSessionRef> for SslSession
impl AsRef<SslSessionRef> for SslSession
fn as_ref(&self) -> &SslSessionRef
fn as_ref(&self) -> &SslSessionRef
Performs the conversion.
impl Send for SslSession
[src]
impl Send for SslSession
impl Sync for SslSession
[src]
impl Sync for SslSession
impl Clone for SslSession
[src]
impl Clone for SslSession
fn clone(&self) -> SslSession
[src]
fn clone(&self) -> SslSession
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more