21#include <compy/priv/compiler_attrs.h>
TLS configuration.
Definition tls.h:26
const char * key_path
Path to PEM private key file.
Definition tls.h:28
const char * cert_path
Path to PEM certificate file.
Definition tls.h:27
Compy_Writer compy_tls_writer(Compy_TlsConn *conn) COMPY_PRIV_MUST_USE
Creates a Compy_Writer backed by a TLS connection.
Definition tls.c:139
void Compy_TlsConn_free(Compy_TlsConn *conn)
Frees per-connection TLS state.
Definition tls.c:83
ssize_t compy_tls_read(Compy_TlsConn *conn, void *buf, size_t len) COMPY_PRIV_MUST_USE
Reads decrypted data from a TLS connection.
Definition tls.c:70
Compy_TlsContext * Compy_TlsContext_new(Compy_TlsConfig config) COMPY_PRIV_MUST_USE
Creates a new TLS context from configuration.
Definition tls.c:17
void Compy_TlsContext_free(Compy_TlsContext *ctx)
Frees a TLS context.
Definition tls.c:37
Compy_TlsConn * Compy_TlsConn_accept(Compy_TlsContext *ctx, int fd) COMPY_PRIV_MUST_USE
Performs server-side TLS handshake on fd.
Definition tls.c:50
int compy_tls_shutdown(Compy_TlsConn *conn)
Shuts down the TLS connection gracefully.
Definition tls.c:76