Typedefs

group group_cy_tls_typedefs

Typedefs

typedef void *cy_tls_context_t

TLS context type.

typedef cy_rslt_t (*cy_network_send_t)(void *context, const unsigned char *buffer, uint32_t length, uint32_t *bytes_sent)

Callback function used by the underlying TLS stack for sending the TLS handshake messages and encrypted data over the network.

Return

CY_RSLT_SUCCESS on success; an error code on failure. On success, it also returns the number of bytes sent.

Parameters
  • [in] context: User context provided at the time of callback registration.

  • [in] buffer: Buffer of the data to send.

  • [in] length: Length of the buffer.

  • [out] bytes_sent: Number of bytes successfully sent over the network.

typedef cy_rslt_t (*cy_network_recv_t)(void *context, unsigned char *buffer, uint32_t length, uint32_t *bytes_received)

Callback function used by the underlying TLS stack for reading TLS handshake messages or the encrypted data from the network.

Return

CY_RSLT_SUCCESS on success; an error code on failure. On success, it also returns the number of bytes received.

Parameters
  • [in] context: User context provided at the time of callback registration.

  • [out] buffer: Buffer into which the received data will be placed.

  • [in] length: Size of the buffer.

  • [out] bytes_received: Number of bytes received.