rustls::msgs::persist

Struct ServerSessionValue

Source
pub struct ServerSessionValue {
    pub(crate) sni: Option<DnsName<'static>>,
    pub(crate) version: ProtocolVersion,
    pub(crate) cipher_suite: CipherSuite,
    pub(crate) master_secret: Zeroizing<PayloadU8>,
    pub(crate) extended_ms: bool,
    pub(crate) client_cert_chain: Option<CertificateChain<'static>>,
    pub(crate) alpn: Option<PayloadU8>,
    pub(crate) application_data: PayloadU16,
    pub creation_time_sec: u64,
    pub(crate) age_obfuscation_offset: u32,
    freshness: Option<bool>,
}

Fields§

§sni: Option<DnsName<'static>>§version: ProtocolVersion§cipher_suite: CipherSuite§master_secret: Zeroizing<PayloadU8>§extended_ms: bool§client_cert_chain: Option<CertificateChain<'static>>§alpn: Option<PayloadU8>§application_data: PayloadU16§creation_time_sec: u64§age_obfuscation_offset: u32§freshness: Option<bool>

Implementations§

Source§

impl ServerSessionValue

Source

pub(crate) fn new( sni: Option<&DnsName<'_>>, v: ProtocolVersion, cs: CipherSuite, ms: &[u8], client_cert_chain: Option<CertificateChain<'static>>, alpn: Option<Vec<u8>>, application_data: Vec<u8>, creation_time: UnixTime, age_obfuscation_offset: u32, ) -> Self

Source

pub(crate) fn set_extended_ms_used(&mut self)

Source

pub(crate) fn set_freshness( self, obfuscated_client_age_ms: u32, time_now: UnixTime, ) -> Self

Source

pub(crate) fn is_fresh(&self) -> bool

Trait Implementations§

Source§

impl Codec<'_> for ServerSessionValue

Source§

fn encode(&self, bytes: &mut Vec<u8>)

Function for encoding itself by appending itself to the provided vec of bytes.
Source§

fn read(r: &mut Reader<'_>) -> Result<Self, InvalidMessage>

Function for decoding itself from the provided reader will return Some if the decoding was successful or None if it was not.
Source§

fn get_encoding(&self) -> Vec<u8>

Convenience function for encoding the implementation into a vec and returning it
Source§

fn read_bytes(bytes: &'a [u8]) -> Result<Self, InvalidMessage>

Function for wrapping a call to the read function in a Reader for the slice of bytes provided Read more
Source§

impl Debug for ServerSessionValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.