28 #if FNET_CFG_TLS || defined(__DOXYGEN__) 69 #if defined(__cplusplus) 300 #if defined(__cplusplus) void fnet_tls_socket_close(fnet_tls_socket_t tls_sock)
Close the TLS socket.
fnet_return_t fnet_tls_socket_set_hostname(fnet_tls_socket_t tls_sock, const fnet_char_t *hostname)
Set the host name to check against the received server certificate.
fnet_tls_desc_t fnet_tls_init(fnet_tls_role_t role)
Initialize the TLS context.
fnet_ssize_t fnet_tls_socket_send(fnet_tls_socket_t tls_sock, const fnet_uint8_t *buf, fnet_size_t len)
Send data on a TLS socket.
fnet_return_t fnet_tls_socket_connect(fnet_tls_socket_t tls_sock)
Perform the TLS handshake.
void * fnet_tls_desc_t
TLS context descriptor.
fnet_return_t
General return codes, used by most of API functions.
void * fnet_socket_t
Socket descriptor.
unsigned long fnet_size_t
Unsigned integer type representing the size in bytes.
fnet_return_t fnet_tls_set_own_certificate(fnet_tls_desc_t tls_desc, const fnet_uint8_t *own_certificate, fnet_size_t own_certificate_size, const fnet_uint8_t *private_key, fnet_size_t private_key_size)
Set own certificate chain and private key.
fnet_tls_role_t
TLS roles.
fnet_ssize_t fnet_tls_socket_recv(fnet_tls_socket_t tls_sock, fnet_uint8_t *buf, fnet_size_t len)
Receive data from a TLS socket.
void * fnet_tls_socket_t
TLS socket descriptor.
fnet_tls_socket_t fnet_tls_socket(fnet_tls_desc_t tls_desc, fnet_socket_t sock)
Create the TLS socket.
char fnet_char_t
Type representing the charecter.
void fnet_tls_release(fnet_tls_desc_t tls_desc)
Release the TLS context.
fnet_return_t fnet_tls_set_ca_certificate(fnet_tls_desc_t tls_desc, const fnet_uint8_t *ca_certificate, fnet_size_t ca_certificate_size)
Assign Certificate Authority certificate.
long fnet_ssize_t
Signed integer type representing the size in bytes.