Struct esp_idf_sys::mbedtls_ssl_session

source ·
#[repr(C)]
pub struct mbedtls_ssl_session {
Show 16 fields pub private_mfl_code: c_uchar, pub private_exported: c_uchar, pub private_endpoint: u8, pub private_tls_version: mbedtls_ssl_protocol_version, pub private_start: mbedtls_time_t, pub private_ciphersuite: c_int, pub private_id_len: usize, pub private_id: [c_uchar; 32], pub private_master: [c_uchar; 48], pub private_peer_cert: *mut mbedtls_x509_crt, pub private_verify_result: u32, pub private_ticket: *mut c_uchar, pub private_ticket_len: usize, pub private_ticket_lifetime: u32, pub private_ticket_creation_time: mbedtls_ms_time_t, pub private_encrypt_then_mac: c_int,
}

Fields§

§private_mfl_code: c_uchar

< MaxFragmentLength negotiated by peer

§private_exported: c_uchar§private_endpoint: u8

< 0: client, 1: server

§private_tls_version: mbedtls_ssl_protocol_version

TLS version negotiated in the session. Used if and when renegotiating or resuming a session instead of the configured minor TLS version.

§private_start: mbedtls_time_t

< start time of current session

§private_ciphersuite: c_int

< chosen ciphersuite

§private_id_len: usize

< session id length

§private_id: [c_uchar; 32]

< session identifier

§private_master: [c_uchar; 48]

< the master secret

§private_peer_cert: *mut mbedtls_x509_crt

< peer X.509 cert chain

§private_verify_result: u32

< verification result

§private_ticket: *mut c_uchar

< RFC 5077 session ticket

§private_ticket_len: usize

< session ticket length

§private_ticket_lifetime: u32

< ticket lifetime hint

§private_ticket_creation_time: mbedtls_ms_time_t

When a ticket is created by a TLS server as part of an established TLS session, the ticket creation time may need to be saved for the ticket module to be able to check the ticket age when the ticket is used. That’s the purpose of this field. Before creating a new ticket, an Mbed TLS server set this field with its current time in milliseconds. This time may then be saved in the session ticket data by the session ticket writing function and recovered by the ticket parsing function later when the ticket is used. The ticket module may then use this time to compute the ticket age and determine if it has expired or not. The Mbed TLS implementations of the session ticket writing and parsing functions save and retrieve the ticket creation time as part of the session ticket data. The session ticket parsing function relies on the mbedtls_ssl_session_get_ticket_creation_time() API to get the ticket creation time from the session ticket data.

§private_encrypt_then_mac: c_int

< flag for EtM activation

Trait Implementations§

source§

impl Clone for mbedtls_ssl_session

source§

fn clone(&self) -> mbedtls_ssl_session

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for mbedtls_ssl_session

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for mbedtls_ssl_session

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Copy for mbedtls_ssl_session

Auto Trait Implementations§

§

impl Freeze for mbedtls_ssl_session

§

impl RefUnwindSafe for mbedtls_ssl_session

§

impl !Send for mbedtls_ssl_session

§

impl !Sync for mbedtls_ssl_session

§

impl Unpin for mbedtls_ssl_session

§

impl UnwindSafe for mbedtls_ssl_session

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Copy,

§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.