conn_ctx
free(conn_ctx->servername);
if ((conn_ctx->servername = strdup(name)) == NULL)
conn_ctx->keypair = sni_ctx->keypair;
SSL_set_SSL_CTX(conn_ctx->ssl_conn, sni_ctx->ssl_ctx);
struct tls *conn_ctx = NULL;
if ((conn_ctx = tls_server_conn(ctx)) == NULL) {
if ((conn_ctx->ssl_conn = SSL_new(ctx->ssl_ctx)) == NULL) {
if (SSL_set_app_data(conn_ctx->ssl_conn, conn_ctx) != 1) {
return conn_ctx;
tls_free(conn_ctx);
struct tls *conn_ctx;
if ((conn_ctx = tls_accept_common(ctx)) == NULL)
if (SSL_set_rfd(conn_ctx->ssl_conn, fd_read) != 1 ||
SSL_set_wfd(conn_ctx->ssl_conn, fd_write) != 1) {
*cctx = conn_ctx;
tls_free(conn_ctx);
struct tls *conn_ctx;
if ((conn_ctx = tls_accept_common(ctx)) == NULL)
if (tls_set_cbs(conn_ctx, read_cb, write_cb, cb_arg) != 0)
*cctx = conn_ctx;
tls_free(conn_ctx);
struct tls *conn_ctx;
if ((conn_ctx = tls_new()) == NULL)
conn_ctx->flags |= TLS_SERVER_CONN;
conn_ctx->config = ctx->config;
conn_ctx->keypair = ctx->config->keypair;
return (conn_ctx);
struct tls *conn_ctx;
if ((conn_ctx = SSL_get_app_data(ssl)) == NULL)
struct conn_ctx *conn;
struct conn_ctx *timeo;
struct conn_ctx *conn;
struct conn_ctx *conn = evt[i].udata;
STAILQ_ENTRY(conn_ctx) c_glob_link;
STAILQ_ENTRY(conn_ctx) c_link;
STAILQ_HEAD(conn_ctx_list, conn_ctx);