pub struct esp_tls_cfg {
Show 21 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,
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.


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_6clientkey_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

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.