Struct esp_idf_sys::esp_tls_cfg
source · #[repr(C)]pub struct esp_tls_cfg {Show 22 fields
pub alpn_protos: *mut *const c_char,
pub __bindgen_anon_1: esp_tls_cfg__bindgen_ty_1,
pub __bindgen_anon_2: esp_tls_cfg__bindgen_ty_2,
pub __bindgen_anon_3: esp_tls_cfg__bindgen_ty_3,
pub __bindgen_anon_4: esp_tls_cfg__bindgen_ty_4,
pub __bindgen_anon_5: esp_tls_cfg__bindgen_ty_5,
pub __bindgen_anon_6: esp_tls_cfg__bindgen_ty_6,
pub clientkey_password: *const c_uchar,
pub clientkey_password_len: c_uint,
pub non_block: bool,
pub use_secure_element: bool,
pub timeout_ms: c_int,
pub use_global_ca_store: bool,
pub common_name: *const c_char,
pub skip_common_name: bool,
pub keep_alive_cfg: *mut tls_keep_alive_cfg_t,
pub psk_hint_key: *const psk_hint_key_t,
pub crt_bundle_attach: Option<unsafe extern "C" fn(conf: *mut c_void) -> esp_err_t>,
pub ds_data: *mut c_void,
pub is_plain_tcp: bool,
pub if_name: *mut ifreq,
pub addr_family: esp_tls_addr_family_t,
}
Expand description
@brief ESP-TLS configuration parameters
@note Note about format of certificates: - This structure includes certificates of a Certificate Authority, of client or server as well as private keys, which may be of PEM or DER format. In case of PEM format, the buffer must be NULL terminated (with NULL character included in certificate size). - Certificate Authority’s certificate may be a chain of certificates in case of PEM format, but could be only one certificate in case of DER format - Variables names of certificates and private key buffers and sizes are defined as unions providing backward compatibility for legacy *_pem_buf and *_pem_bytes names which suggested only PEM format was supported. It is encouraged to use generic names such as cacert_buf and cacert_bytes.
Fields§
§alpn_protos: *mut *const c_char
< Application protocols required for HTTP2. If HTTP2/ALPN support is required, a list of protocols that should be negotiated. The format is length followed by protocol name. For the most common cases the following is ok: const char **alpn_protos = { “h2”, NULL };
- where ‘h2’ is the protocol name
__bindgen_anon_1: esp_tls_cfg__bindgen_ty_1
§__bindgen_anon_2: esp_tls_cfg__bindgen_ty_2
§__bindgen_anon_3: esp_tls_cfg__bindgen_ty_3
§__bindgen_anon_4: esp_tls_cfg__bindgen_ty_4
§__bindgen_anon_5: esp_tls_cfg__bindgen_ty_5
§__bindgen_anon_6: esp_tls_cfg__bindgen_ty_6
§clientkey_password: *const c_uchar
< Client key decryption password string
clientkey_password_len: c_uint
< String length of the password pointed to by clientkey_password
non_block: bool
< Configure non-blocking mode. If set to true the underneath socket will be configured in non blocking mode after tls session is established
use_secure_element: bool
< Enable this option to use secure element or atecc608a chip ( Integrated with ESP32-WROOM-32SE )
timeout_ms: c_int
< Network timeout in milliseconds. Note: If this value is not set, by default the timeout is set to 10 seconds. If you wish that the session should wait indefinitely then please use a larger value e.g., INT32_MAX
use_global_ca_store: bool
< Use a global ca_store for all the connections in which this bool is set.
common_name: *const c_char
< If non-NULL, server certificate CN must match this name. If NULL, server certificate CN must match hostname.
skip_common_name: bool
< Skip any validation of server certificate CN field
keep_alive_cfg: *mut tls_keep_alive_cfg_t
< Enable TCP keep-alive timeout for SSL connection
psk_hint_key: *const psk_hint_key_t
< Pointer to PSK hint and key. if not NULL (and certificates are NULL) then PSK authentication is enabled with configured setup. Important note: the pointer must be valid for connection
crt_bundle_attach: Option<unsafe extern "C" fn(conf: *mut c_void) -> esp_err_t>
§ds_data: *mut c_void
< Pointer for digital signature peripheral context
is_plain_tcp: bool
< Use non-TLS connection: When set to true, the esp-tls uses plain TCP transport rather then TLS/SSL connection. Note, that it is possible to connect using a plain tcp transport directly with esp_tls_plain_tcp_connect() API
if_name: *mut ifreq
< The name of interface for data to go through. Use the default interface without setting
addr_family: esp_tls_addr_family_t
< The address family to use when connecting to a host.
Trait Implementations§
source§impl Clone for esp_tls_cfg
impl Clone for esp_tls_cfg
source§fn clone(&self) -> esp_tls_cfg
fn clone(&self) -> esp_tls_cfg
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for esp_tls_cfg
impl Default for esp_tls_cfg
impl Copy for esp_tls_cfg
Auto Trait Implementations§
impl Freeze for esp_tls_cfg
impl RefUnwindSafe for esp_tls_cfg
impl !Send for esp_tls_cfg
impl !Sync for esp_tls_cfg
impl Unpin for esp_tls_cfg
impl UnwindSafe for esp_tls_cfg
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: 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
)§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
)