#[repr(C)]
pub struct esp_tls {
Show 18 fields pub ssl: mbedtls_ssl_context, pub entropy: mbedtls_entropy_context, pub ctr_drbg: mbedtls_ctr_drbg_context, pub conf: mbedtls_ssl_config, pub server_fd: mbedtls_net_context, pub cacert: mbedtls_x509_crt, pub cacert_ptr: *mut mbedtls_x509_crt, pub clientcert: mbedtls_x509_crt, pub clientkey: mbedtls_pk_context, pub sockfd: c_int, pub read: Option<unsafe extern "C" fn(tls: *mut esp_tls, data: *mut c_char, datalen: usize) -> isize>, pub write: Option<unsafe extern "C" fn(tls: *mut esp_tls, data: *const c_char, datalen: usize) -> isize>, pub conn_state: esp_tls_conn_state_t, pub rset: _types_fd_set, pub wset: _types_fd_set, pub is_tls: bool, pub role: esp_tls_role_t, pub error_handle: esp_tls_error_handle_t,
}
Expand description

@brief ESP-TLS Connection Handle

Fields

ssl: mbedtls_ssl_context

< TLS/SSL context

entropy: mbedtls_entropy_context

< mbedTLS entropy context structure

ctr_drbg: mbedtls_ctr_drbg_context

< mbedTLS ctr drbg context structure. CTR_DRBG is deterministic random bit generation based on AES-256

conf: mbedtls_ssl_config

< TLS/SSL configuration to be shared between mbedtls_ssl_context structures

server_fd: mbedtls_net_context

< mbedTLS wrapper type for sockets

cacert: mbedtls_x509_crt

< Container for the X.509 CA certificate

cacert_ptr: *mut mbedtls_x509_crt

< Pointer to the cacert being used.

clientcert: mbedtls_x509_crt

< Container for the X.509 client certificate

clientkey: mbedtls_pk_context

< Container for the private key of the client certificate

sockfd: c_int

< Underlying socket file descriptor.

read: Option<unsafe extern "C" fn(tls: *mut esp_tls, data: *mut c_char, datalen: usize) -> isize>

< Callback function for reading data from TLS/SSL connection.

write: Option<unsafe extern "C" fn(tls: *mut esp_tls, data: *const c_char, datalen: usize) -> isize>

< Callback function for writing data to TLS/SSL connection.

conn_state: esp_tls_conn_state_t

< ESP-TLS Connection state

rset: _types_fd_set

< read file descriptors

wset: _types_fd_set

< write file descriptors

is_tls: bool

< indicates connection type (TLS or NON-TLS)

role: esp_tls_role_t

< esp-tls role

  • ESP_TLS_CLIENT
  • ESP_TLS_SERVER
error_handle: esp_tls_error_handle_t

< handle to error descriptor

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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.