Struct esp_idf_sys::mbedtls_ssl_context
source · #[repr(C)]pub struct mbedtls_ssl_context {Show 59 fields
pub private_conf: *const mbedtls_ssl_config,
pub private_state: c_int,
pub private_renego_status: c_int,
pub private_renego_records_seen: c_int,
pub private_tls_version: mbedtls_ssl_protocol_version,
pub private_badmac_seen: c_uint,
pub private_f_vrfy: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *mut mbedtls_x509_crt, arg3: c_int, arg4: *mut u32) -> c_int>,
pub private_p_vrfy: *mut c_void,
pub private_f_send: mbedtls_ssl_send_t,
pub private_f_recv: mbedtls_ssl_recv_t,
pub private_f_recv_timeout: mbedtls_ssl_recv_timeout_t,
pub private_p_bio: *mut c_void,
pub private_session_in: *mut mbedtls_ssl_session,
pub private_session_out: *mut mbedtls_ssl_session,
pub private_session: *mut mbedtls_ssl_session,
pub private_session_negotiate: *mut mbedtls_ssl_session,
pub private_handshake: *mut mbedtls_ssl_handshake_params,
pub private_transform_in: *mut mbedtls_ssl_transform,
pub private_transform_out: *mut mbedtls_ssl_transform,
pub private_transform: *mut mbedtls_ssl_transform,
pub private_transform_negotiate: *mut mbedtls_ssl_transform,
pub private_p_timer: *mut c_void,
pub private_f_set_timer: mbedtls_ssl_set_timer_t,
pub private_f_get_timer: mbedtls_ssl_get_timer_t,
pub private_in_buf: *mut c_uchar,
pub private_in_ctr: *mut c_uchar,
pub private_in_hdr: *mut c_uchar,
pub private_in_len: *mut c_uchar,
pub private_in_iv: *mut c_uchar,
pub private_in_msg: *mut c_uchar,
pub private_in_offt: *mut c_uchar,
pub private_in_msgtype: c_int,
pub private_in_msglen: usize,
pub private_in_left: usize,
pub private_in_hslen: usize,
pub private_nb_zero: c_int,
pub private_keep_current_message: c_int,
pub private_send_alert: c_uchar,
pub private_alert_type: c_uchar,
pub private_alert_reason: c_int,
pub private_out_buf: *mut c_uchar,
pub private_out_ctr: *mut c_uchar,
pub private_out_hdr: *mut c_uchar,
pub private_out_len: *mut c_uchar,
pub private_out_iv: *mut c_uchar,
pub private_out_msg: *mut c_uchar,
pub private_out_msgtype: c_int,
pub private_out_msglen: usize,
pub private_out_left: usize,
pub private_cur_out_ctr: [c_uchar; 8],
pub private_hostname: *mut c_char,
pub private_alpn_chosen: *const c_char,
pub private_secure_renegotiation: c_int,
pub private_verify_data_len: usize,
pub private_own_verify_data: [c_char; 12],
pub private_peer_verify_data: [c_char; 12],
pub private_f_export_keys: mbedtls_ssl_export_keys_t,
pub private_p_export_keys: *mut c_void,
pub private_user_data: mbedtls_ssl_user_data_t,
}
Fields§
§private_conf: *const mbedtls_ssl_config
< configuration information
private_state: c_int
< SSL handshake: current state
private_renego_status: c_int
< Initial, in progress, pending?
private_renego_records_seen: c_int
< Records since renego request, or with DTLS, number of retransmissions of request if renego_max_records is < 0
private_tls_version: mbedtls_ssl_protocol_version
Maximum TLS version to be negotiated, then negotiated TLS version.
It is initialized as the configured maximum TLS version to be negotiated by mbedtls_ssl_setup().
When renegotiating or resuming a session, it is overwritten in the ClientHello writing preparation stage with the previously negotiated TLS version.
On client side, it is updated to the TLS version selected by the server for the handshake when the ServerHello is received.
On server side, it is updated to the TLS version the server selects for the handshake when the ClientHello is received.
private_badmac_seen: c_uint
< records with a bad MAC received
private_f_vrfy: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *mut mbedtls_x509_crt, arg3: c_int, arg4: *mut u32) -> c_int>
Callback to customize X.509 certificate chain verification
private_p_vrfy: *mut c_void
< context for X.509 verify callback
private_f_send: mbedtls_ssl_send_t
< Callback for network send
private_f_recv: mbedtls_ssl_recv_t
< Callback for network receive
private_f_recv_timeout: mbedtls_ssl_recv_timeout_t
§private_p_bio: *mut c_void
< context for I/O operations
private_session_in: *mut mbedtls_ssl_session
< current session data (in)
private_session_out: *mut mbedtls_ssl_session
< current session data (out)
private_session: *mut mbedtls_ssl_session
< negotiated session data
private_session_negotiate: *mut mbedtls_ssl_session
< session data in negotiation
private_handshake: *mut mbedtls_ssl_handshake_params
< params required only during the handshake process
private_transform_in: *mut mbedtls_ssl_transform
< current transform params (in) This is always a reference, never an owning pointer.
private_transform_out: *mut mbedtls_ssl_transform
< current transform params (out) This is always a reference, never an owning pointer.
private_transform: *mut mbedtls_ssl_transform
< negotiated transform params This pointer owns the transform it references.
private_transform_negotiate: *mut mbedtls_ssl_transform
< transform params in negotiation This pointer owns the transform it references.
private_p_timer: *mut c_void
< context for the timer callbacks
private_f_set_timer: mbedtls_ssl_set_timer_t
< set timer callback
private_f_get_timer: mbedtls_ssl_get_timer_t
< get timer callback
private_in_buf: *mut c_uchar
< input buffer
private_in_ctr: *mut c_uchar
< 64-bit incoming message counter TLS: maintained by us DTLS: read from peer
private_in_hdr: *mut c_uchar
< start of record header
private_in_len: *mut c_uchar
< two-bytes message length field
private_in_iv: *mut c_uchar
< ivlen-byte IV
private_in_msg: *mut c_uchar
< message contents (in_iv+ivlen)
private_in_offt: *mut c_uchar
< read offset in application data
private_in_msgtype: c_int
< record header: message type
private_in_msglen: usize
< record header: message length
private_in_left: usize
< amount of data read so far
private_in_hslen: usize
< current handshake message length, including the handshake header
private_nb_zero: c_int
< # of 0-length encrypted messages
private_keep_current_message: c_int
< drop or reuse current message on next call to record layer?
private_send_alert: c_uchar
< Determines if a fatal alert should be sent. Values:
- \c 0 , no alert is to be sent.
- \c 1 , alert is to be sent.
private_alert_type: c_uchar
< Type of alert if send_alert = 0
private_alert_reason: c_int
< The error code to be returned to the user once the fatal alert has been sent.
private_out_buf: *mut c_uchar
< output buffer
private_out_ctr: *mut c_uchar
< 64-bit outgoing message counter
private_out_hdr: *mut c_uchar
< start of record header
private_out_len: *mut c_uchar
< two-bytes message length field
private_out_iv: *mut c_uchar
< ivlen-byte IV
private_out_msg: *mut c_uchar
< message contents (out_iv+ivlen)
private_out_msgtype: c_int
< record header: message type
private_out_msglen: usize
< record header: message length
private_out_left: usize
< amount of data not yet written
private_cur_out_ctr: [c_uchar; 8]
< Outgoing record sequence number.
private_hostname: *mut c_char
< expected peer CN for verification (and SNI if available)
private_alpn_chosen: *const c_char
< negotiated protocol
private_secure_renegotiation: c_int
< does peer support legacy or secure renegotiation
private_verify_data_len: usize
< length of verify data stored
private_own_verify_data: [c_char; 12]
< previous handshake verify data
private_peer_verify_data: [c_char; 12]
< previous handshake verify data
private_f_export_keys: mbedtls_ssl_export_keys_t
Callback to export key block and master secret
private_p_export_keys: *mut c_void
< context for key export callback
private_user_data: mbedtls_ssl_user_data_t
User data pointer or handle.
The library sets this to \p 0 when creating a context and does not access it afterwards.
\warning Serializing and restoring an SSL context with mbedtls_ssl_context_save() and mbedtls_ssl_context_load() does not currently restore the user data.
Trait Implementations§
source§impl Clone for mbedtls_ssl_context
impl Clone for mbedtls_ssl_context
source§fn clone(&self) -> mbedtls_ssl_context
fn clone(&self) -> mbedtls_ssl_context
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for mbedtls_ssl_context
impl Default for mbedtls_ssl_context
impl Copy for mbedtls_ssl_context
Auto Trait Implementations§
impl Freeze for mbedtls_ssl_context
impl RefUnwindSafe for mbedtls_ssl_context
impl !Send for mbedtls_ssl_context
impl !Sync for mbedtls_ssl_context
impl Unpin for mbedtls_ssl_context
impl UnwindSafe for mbedtls_ssl_context
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)