# include "internal/quic_types.h"
# include "internal/quic_reactor.h"
# include "internal/quic_demux.h"
+# include "internal/quic_predef.h"
# include "internal/thread_arch.h"
# ifndef OPENSSL_NO_QUIC
*/
OSSL_TIME (*now_cb)(void *arg);
void *now_cb_arg;
+
+ /*
+ * This SSL_CTX will be used when constructing the handshake layer object
+ * inside newly created channels.
+ */
+ SSL_CTX *channel_ctx;
} QUIC_PORT_ARGS;
typedef struct quic_port_st QUIC_PORT;
port_args.libctx = qc->ssl.ctx->libctx;
port_args.propq = qc->ssl.ctx->propq;
port_args.mutex = qc->mutex;
+ port_args.channel_ctx = qc->ssl.ctx;
port_args.now_cb = get_time_cb;
port_args.now_cb_arg = qc;
port->mutex = args->mutex;
port->now_cb = args->now_cb;
port->now_cb_arg = args->now_cb_arg;
+ port->channel_ctx = args->channel_ctx;
if (!port_init(port)) {
OPENSSL_free(port);
{
size_t rx_short_cid_len = 8;
+ if (port->channel_ctx == NULL)
+ goto err;
+
if ((port->demux = ossl_quic_demux_new(/*BIO=*/NULL,
/*Short CID Len=*/rx_short_cid_len,
get_time, port)) == NULL)
OSSL_TIME (*now_cb)(void *arg);
void *now_cb_arg;
+ /* Used to create handshake layer objects inside newly created channels. */
+ SSL_CTX *channel_ctx;
+
/* Asynchronous I/O reactor. */
QUIC_REACTOR rtor;
port_args.libctx = srv->args.libctx;
port_args.propq = srv->args.propq;
port_args.mutex = srv->mutex;
+ port_args.channel_ctx = srv->ctx;
port_args.now_cb = srv->args.now_cb;
port_args.now_cb_arg = srv->args.now_cb_arg;