Struct openssl::ssl::SslSessionRef [−]
pub struct SslSessionRef(_);
Reference to SslSession.
Methods
impl SslSessionRef[src]
impl SslSessionRefpub 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) -> usizeReturns 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]) -> usizeCopies 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) -> u32Gets 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 Borrow<SslSessionRef> for SslSession
impl Borrow<SslSessionRef> for SslSessionfn borrow(&self) -> &SslSessionRef
fn borrow(&self) -> &SslSessionRefImmutably borrows from an owned value. Read more
impl AsRef<SslSessionRef> for SslSession
impl AsRef<SslSessionRef> for SslSessionfn as_ref(&self) -> &SslSessionRef
fn as_ref(&self) -> &SslSessionRefPerforms the conversion.
impl ForeignTypeRef for SslSessionRef
impl ForeignTypeRef for SslSessionReftype CType = SSL_SESSION
The raw C type.
ⓘImportant traits for &'a mut Runsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self[src]
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a SelfConstructs a shared instance of this type from its raw type.
ⓘImportant traits for &'a mut Runsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self[src]
unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut SelfConstructs a mutable reference of this type from its raw type.
fn as_ptr(&self) -> *mut Self::CType[src]
fn as_ptr(&self) -> *mut Self::CTypeReturns a raw pointer to the wrapped value.
impl Send for SslSessionRef[src]
impl Send for SslSessionRefimpl Sync for SslSessionRef[src]
impl Sync for SslSessionRefimpl ToOwned for SslSessionRef[src]
impl ToOwned for SslSessionReftype Owned = SslSession
fn to_owned(&self) -> SslSession[src]
fn to_owned(&self) -> SslSessionCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut Self::Owned)[src]
fn clone_into(&self, target: &mut Self::Owned)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more