Struct esp_idf_sys::esp_tls
source · [−]#[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
impl Copy for esp_tls
Auto Trait Implementations
impl RefUnwindSafe for esp_tls
impl !Send for esp_tls
impl !Sync for esp_tls
impl Unpin for esp_tls
impl UnwindSafe for esp_tls
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more