protocomm_security struct
Protocomm security object structure. The member functions are used for implementing secure protocomm sessions.
Syntax
typedef struct protocomm_security
{
int ver;
esp_err_t (*init)(protocomm_security_handle_t *handle);
esp_err_t (*cleanup)(protocomm_security_handle_t handle);
esp_err_t (*new_transport_session)(protocomm_security_handle_t handle,
uint32_t session_id);
esp_err_t (*close_transport_session)(protocomm_security_handle_t handle,
uint32_t session_id);
esp_err_t (*security_req_handler)(protocomm_security_handle_t handle,
const void *sec_params,
uint32_t session_id,
const uint8_t *inbuf, ssize_t inlen,
uint8_t **outbuf, ssize_t *outlen,
void *priv_data);
esp_err_t (*encrypt)(protocomm_security_handle_t handle,
uint32_t session_id,
const uint8_t *inbuf, ssize_t inlen,
uint8_t **outbuf, ssize_t *outlen);
esp_err_t (*decrypt)(protocomm_security_handle_t handle,
uint32_t session_id,
const uint8_t *inbuf, ssize_t inlen,
uint8_t **outbuf, ssize_t *outlen);
} protocomm_security_t;
Fields
Unique version number of security implementation.
Function for initializing/allocating security infrastructure.
Function for deallocating security infrastructure.
Starts new secure transport session with specified ID.
Closes a secure transport session with specified ID.
Handler function for authenticating connection request and establishing secure session.
Function which implements the encryption algorithm.
Function which implements the decryption algorithm.