17 #ifndef __IOTC_BSP_TLS_H__ 18 #define __IOTC_BSP_TLS_H__ 75 void* (*fp_libiotc_alloc)(size_t);
78 void* (*fp_libiotc_calloc)(size_t, size_t);
81 void* (*fp_libiotc_realloc)(
void*, size_t);
140 uint8_t* data_ptr,
size_t data_size,
162 uint8_t* data_ptr,
size_t data_size,
168 void* context,
int* bytes_sent);
173 void* context,
int* bytes_sent);
iotc_bsp_tls_state_t iotc_bsp_tls_write(iotc_bsp_tls_context_t *tls_context, uint8_t *data_ptr, size_t data_size, int *bytes_written)
Write data to a socket.
Can't initialize TLS library.
iotc_bsp_tls_state_t iotc_bsp_tls_read(iotc_bsp_tls_context_t *tls_context, uint8_t *data_ptr, size_t data_size, int *bytes_read)
Reads data on a socket.
iotc_bsp_tls_state_t iotc_bsp_tls_init(iotc_bsp_tls_context_t **tls_context, iotc_bsp_tls_init_params_t *init_params)
Initializes a TLS library and creates a TLS context.
iotc_bsp_tls_state_t iotc_bsp_tls_send_callback(char *buf, int sz, void *context, int *bytes_sent)
void iotc_bsp_tls_context_t
The TLS context.
TLS handshake is partially complete.
size_t ca_cert_pem_buf_length
The length, in bytes, of ca_cert_pem_buf.
uint8_t * ca_cert_pem_buf
A pointer to a buffer with root CA PEM certificates.
iotc_bsp_tls_state_t iotc_bsp_tls_connect(iotc_bsp_tls_context_t *tls_context)
Starts a TLS handshake.
The TLS context parameters.
void(* fp_libiotc_free)(void *)
A pointer to the client application's free memory function.
iotc_bsp_tls_state_t iotc_bsp_tls_cleanup(iotc_bsp_tls_context_t **tls_context)
Frees a TLS context from memory and deletes any associated data.
int iotc_bsp_tls_pending(iotc_bsp_tls_context_t *tls_context)
Gets the pending readable bytes.
enum iotc_bsp_tls_state_e iotc_bsp_tls_state_t
The TLS function succeeded.
TLS handshake is partially complete.
void * libiotc_io_callback_context
Callback context.
iotc_bsp_tls_state_t iotc_bsp_tls_recv_callback(char *buf, int sz, void *context, int *bytes_sent)
Can't validate CA certificate.
Can't complete TLS handshake.
const char * domain_name
A pointer to the host's domain name.
struct iotc_bsp_tls_init_params_s iotc_bsp_tls_init_params_t
The TLS context parameters.