int ssl_quic_initial_ctx(struct bind_conf *bind_conf);
SSL_CTX *ssl_quic_srv_new_ssl_ctx(void);
-int qc_alloc_ssl_sock_ctx(struct quic_conn *qc, struct connection *conn);
+int qc_alloc_ssl_sock_ctx(struct quic_conn *qc, void *target);
int qc_ssl_provide_all_quic_data(struct quic_conn *qc, struct ssl_sock_ctx *ctx);
int qc_ssl_do_hanshake(struct quic_conn *qc, struct ssl_sock_ctx *ctx);
qc->wait_event.events = 0;
qc->subs = NULL;
- if (qc_alloc_ssl_sock_ctx(qc, conn) ||
+ if (qc_alloc_ssl_sock_ctx(qc, target) ||
!quic_conn_init_timer(qc) ||
!quic_conn_init_idle_timer_task(qc, prx))
goto err;
* CO_ER_SSL_NO_MEM.
*/
static int qc_ssl_sess_init(struct quic_conn *qc, SSL_CTX *ssl_ctx, SSL **ssl,
- struct connection *conn, int server)
+ int server)
{
int retry, ret = -1;
*
* Returns 0 on success else non-zero.
*/
-int qc_alloc_ssl_sock_ctx(struct quic_conn *qc, struct connection *conn)
+int qc_alloc_ssl_sock_ctx(struct quic_conn *qc, void *target)
{
- int ret = 0;
struct ssl_sock_ctx *ctx = NULL;
+ struct bind_conf *bc;
+ struct server *srv;
+ int ret = 0;
TRACE_ENTER(QUIC_EV_CONN_NEW, qc);
goto err;
}
- ctx->conn = conn;
+ ctx->conn = NULL;
ctx->bio = NULL;
ctx->xprt = NULL;
ctx->xprt_ctx = NULL;
ctx->qc = qc;
if (!qc_is_back(qc)) {
- struct bind_conf *bc = qc->li->bind_conf;
-
- if (qc_ssl_sess_init(qc, bc->initial_ctx, &ctx->ssl, NULL, 1) == -1)
+ bc = __objt_listener(target)->bind_conf;
+ if (qc_ssl_sess_init(qc, bc->initial_ctx, &ctx->ssl, 1) == -1)
goto err;
#if (HA_OPENSSL_VERSION_NUMBER >= 0x10101000L) && defined(HAVE_SSL_0RTT_QUIC)
/* Enabling 0-RTT */
SSL_set_accept_state(ctx->ssl);
}
else {
- struct server *srv = __objt_server(ctx->conn->target);
-
- if (qc_ssl_sess_init(qc, srv->ssl_ctx.ctx, &ctx->ssl, conn, 0) == -1)
+ srv = __objt_server(target);
+ if (qc_ssl_sess_init(qc, srv->ssl_ctx.ctx, &ctx->ssl, 0) == -1)
goto err;
if (!qc_ssl_set_quic_transport_params(ctx->ssl, qc, quic_version_1, 0))