Struct SslSessionRef
pub struct SslSessionRef(/* private fields */);
Expand description
A borrowed reference to a SslSession
.
Implementations§
§impl SslSessionRef
impl SslSessionRef
pub fn id(&self) -> &[u8] ⓘ
pub fn id(&self) -> &[u8] ⓘ
Returns the SSL session ID.
This corresponds to SSL_SESSION_get_id
.
pub fn master_key_len(&self) -> usize
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
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 time(&self) -> u64
pub fn time(&self) -> u64
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) -> u32
pub fn timeout(&self) -> u32
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 protocol_version(&self) -> SslVersion
pub fn protocol_version(&self) -> SslVersion
Returns the session’s TLS protocol version.
This corresponds to SSL_SESSION_get_protocol_version
.
pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
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 AsMut<SslSessionRef> for SslSession
impl AsMut<SslSessionRef> for SslSession
§fn as_mut(&mut self) -> &mut SslSessionRef
fn as_mut(&mut self) -> &mut SslSessionRef
§impl AsRef<SslSessionRef> for SslSession
impl AsRef<SslSessionRef> for SslSession
§fn as_ref(&self) -> &SslSessionRef
fn as_ref(&self) -> &SslSessionRef
§impl Borrow<SslSessionRef> for SslSession
impl Borrow<SslSessionRef> for SslSession
§fn borrow(&self) -> &SslSessionRef
fn borrow(&self) -> &SslSessionRef
§impl BorrowMut<SslSessionRef> for SslSession
impl BorrowMut<SslSessionRef> for SslSession
§fn borrow_mut(&mut self) -> &mut SslSessionRef
fn borrow_mut(&mut self) -> &mut SslSessionRef
§impl ForeignTypeRef for SslSessionRef
impl ForeignTypeRef for SslSessionRef
§impl ToOwned for SslSessionRef
impl ToOwned for SslSessionRef
§type Owned = SslSession
type Owned = SslSession
§fn to_owned(&self) -> SslSession
fn to_owned(&self) -> SslSession
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
impl Send for SslSessionRef
impl Sync for SslSessionRef
Auto Trait Implementations§
impl Freeze for SslSessionRef
impl !RefUnwindSafe for SslSessionRef
impl Unpin for SslSessionRef
impl UnwindSafe for SslSessionRef
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more