Struct esp_idf_sys::mbedtls_ssl_config

source ·
#[repr(C)]
pub struct mbedtls_ssl_config {
Show 42 fields pub private_max_tls_version: mbedtls_ssl_protocol_version, pub private_min_tls_version: mbedtls_ssl_protocol_version, pub private_endpoint: u8, pub private_transport: u8, pub private_authmode: u8, pub private_allow_legacy_renegotiation: u8, pub private_mfl_code: u8, pub private_encrypt_then_mac: u8, pub private_extended_ms: u8, pub private_disable_renegotiation: u8, pub private_session_tickets: u8, pub private_cert_req_ca_list: u8, pub private_respect_cli_pref: u8, pub private_ciphersuite_list: *const c_int, pub private_f_dbg: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: c_int, arg3: *const c_char, arg4: c_int, arg5: *const c_char)>, pub private_p_dbg: *mut c_void, pub private_f_rng: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *mut c_uchar, arg3: usize) -> c_int>, pub private_p_rng: *mut c_void, pub private_f_get_cache: mbedtls_ssl_cache_get_t, pub private_f_set_cache: mbedtls_ssl_cache_set_t, pub private_p_cache: *mut c_void, pub private_f_sni: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *mut mbedtls_ssl_context, arg3: *const c_uchar, arg4: usize) -> c_int>, pub private_p_sni: *mut c_void, 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_ticket_write: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *const mbedtls_ssl_session, arg3: *mut c_uchar, arg4: *const c_uchar, arg5: *mut usize, arg6: *mut u32) -> c_int>, pub private_f_ticket_parse: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *mut mbedtls_ssl_session, arg3: *mut c_uchar, arg4: usize) -> c_int>, pub private_p_ticket: *mut c_void, pub private_cert_profile: *const mbedtls_x509_crt_profile, pub private_key_cert: *mut mbedtls_ssl_key_cert, pub private_ca_chain: *mut mbedtls_x509_crt, pub private_ca_crl: *mut mbedtls_x509_crl, pub private_sig_algs: *const u16, pub private_group_list: *const u16, pub private_alpn_list: *mut *const c_char, pub private_read_timeout: u32, pub private_renego_max_records: c_int, pub private_renego_period: [c_uchar; 8], pub private_badmac_limit: c_uint, pub private_user_data: mbedtls_ssl_user_data_t, pub private_f_cert_cb: mbedtls_ssl_hs_cb_t, pub private_dn_hints: *const mbedtls_x509_crt,
}
Expand description

SSL/TLS configuration to be shared between mbedtls_ssl_context structures.

Fields§

§private_max_tls_version: mbedtls_ssl_protocol_version

< max. TLS version used

§private_min_tls_version: mbedtls_ssl_protocol_version

< min. TLS version used

§private_endpoint: u8

< 0: client, 1: server

§private_transport: u8

< 0: stream (TLS), 1: datagram (DTLS)

§private_authmode: u8

< MBEDTLS_SSL_VERIFY_XXX

§private_allow_legacy_renegotiation: u8

< MBEDTLS_LEGACY_XXX

§private_mfl_code: u8

< desired fragment length indicator (MBEDTLS_SSL_MAX_FRAG_LEN_XXX)

§private_encrypt_then_mac: u8

< negotiate encrypt-then-mac?

§private_extended_ms: u8

< negotiate extended master secret?

§private_disable_renegotiation: u8

< disable renegotiation?

§private_session_tickets: u8

< use session tickets?

§private_cert_req_ca_list: u8

< enable sending CA list in Certificate Request messages?

§private_respect_cli_pref: u8

< pick the ciphersuite according to the client’s preferences rather than ours?

§private_ciphersuite_list: *const c_int

Allowed ciphersuites for (D)TLS 1.2 (0-terminated)

§private_f_dbg: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: c_int, arg3: *const c_char, arg4: c_int, arg5: *const c_char)>

Callback for printing debug output

§private_p_dbg: *mut c_void

< context for the debug function

§private_f_rng: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *mut c_uchar, arg3: usize) -> c_int>

Callback for getting (pseudo-)random numbers

§private_p_rng: *mut c_void

< context for the RNG function

§private_f_get_cache: mbedtls_ssl_cache_get_t

Callback to retrieve a session from the cache

§private_f_set_cache: mbedtls_ssl_cache_set_t

Callback to store a session into the cache

§private_p_cache: *mut c_void

< context for cache callbacks

§private_f_sni: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *mut mbedtls_ssl_context, arg3: *const c_uchar, arg4: usize) -> c_int>

Callback for setting cert according to SNI extension

§private_p_sni: *mut c_void

< context for SNI callback

§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 calllback

§private_f_ticket_write: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *const mbedtls_ssl_session, arg3: *mut c_uchar, arg4: *const c_uchar, arg5: *mut usize, arg6: *mut u32) -> c_int>

Callback to create & write a session ticket

§private_f_ticket_parse: Option<unsafe extern "C" fn(arg1: *mut c_void, arg2: *mut mbedtls_ssl_session, arg3: *mut c_uchar, arg4: usize) -> c_int>

Callback to parse a session ticket into a session structure

§private_p_ticket: *mut c_void

< context for the ticket callbacks

§private_cert_profile: *const mbedtls_x509_crt_profile

< verification profile

§private_key_cert: *mut mbedtls_ssl_key_cert

< own certificate/key pair(s)

§private_ca_chain: *mut mbedtls_x509_crt

< trusted CAs

§private_ca_crl: *mut mbedtls_x509_crl

< trusted CAs CRLs

§private_sig_algs: *const u16

< allowed signature algorithms

§private_group_list: *const u16

< allowed IANA NamedGroups

§private_alpn_list: *mut *const c_char

< ordered list of protocols

§private_read_timeout: u32

< timeout for mbedtls_ssl_read (ms)

§private_renego_max_records: c_int

< grace period for renegotiation

§private_renego_period: [c_uchar; 8]

< value of the record counters that triggers renegotiation

§private_badmac_limit: c_uint

< limit of records with a bad MAC

§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.

§private_f_cert_cb: mbedtls_ssl_hs_cb_t

< certificate selection callback

§private_dn_hints: *const mbedtls_x509_crt

< acceptable client cert issuers

Trait Implementations§

source§

impl Clone for mbedtls_ssl_config

source§

fn clone(&self) -> mbedtls_ssl_config

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 Default for mbedtls_ssl_config

source§

fn default() -> Self

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

impl Copy for mbedtls_ssl_config

Auto Trait Implementations§

§

impl Freeze for mbedtls_ssl_config

§

impl RefUnwindSafe for mbedtls_ssl_config

§

impl !Send for mbedtls_ssl_config

§

impl !Sync for mbedtls_ssl_config

§

impl Unpin for mbedtls_ssl_config

§

impl UnwindSafe for mbedtls_ssl_config

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.