ngx_quic_conf_t *conf;
- ngx_ssl_t *ssl;
-
ngx_event_t push;
ngx_event_t pto;
ngx_event_t close;
static ngx_quic_connection_t *ngx_quic_new_connection(ngx_connection_t *c,
- ngx_ssl_t *ssl, ngx_quic_conf_t *conf, ngx_quic_header_t *pkt);
+ ngx_quic_conf_t *conf, ngx_quic_header_t *pkt);
static ngx_int_t ngx_quic_send_stateless_reset(ngx_connection_t *c,
ngx_quic_conf_t *conf, ngx_quic_header_t *pkt);
static ngx_int_t ngx_quic_process_stateless_reset(ngx_connection_t *c,
ngx_quic_connection_t *qc);
static ngx_int_t ngx_quic_input(ngx_connection_t *c, ngx_buf_t *b,
- ngx_ssl_t *ssl, ngx_quic_conf_t *conf);
-static ngx_int_t ngx_quic_process_packet(ngx_connection_t *c, ngx_ssl_t *ssl,
+ ngx_quic_conf_t *conf);
+static ngx_int_t ngx_quic_process_packet(ngx_connection_t *c,
ngx_quic_conf_t *conf, ngx_quic_header_t *pkt);
static ngx_int_t ngx_quic_init_secrets(ngx_connection_t *c);
static void ngx_quic_discard_ctx(ngx_connection_t *c,
void
-ngx_quic_run(ngx_connection_t *c, ngx_ssl_t *ssl, ngx_quic_conf_t *conf)
+ngx_quic_run(ngx_connection_t *c, ngx_quic_conf_t *conf)
{
ngx_int_t rc;
c->log->action = "QUIC initialization";
- rc = ngx_quic_input(c, c->buffer, ssl, conf);
+ rc = ngx_quic_input(c, c->buffer, conf);
if (rc != NGX_OK) {
ngx_quic_close_connection(c, rc == NGX_DECLINED ? NGX_DONE : NGX_ERROR);
return;
static ngx_quic_connection_t *
-ngx_quic_new_connection(ngx_connection_t *c, ngx_ssl_t *ssl,
- ngx_quic_conf_t *conf, ngx_quic_header_t *pkt)
+ngx_quic_new_connection(ngx_connection_t *c, ngx_quic_conf_t *conf,
+ ngx_quic_header_t *pkt)
{
ngx_uint_t i;
ngx_quic_tp_t *ctp;
qc->push.handler = ngx_quic_push_handler;
qc->push.cancelable = 1;
- qc->ssl = ssl;
qc->conf = conf;
qc->tp = conf->tp;
qc = c->quic;
- if (ngx_ssl_create_connection(qc->ssl, c, NGX_SSL_BUFFER) != NGX_OK) {
+ if (ngx_ssl_create_connection(qc->conf->ssl, c, NGX_SSL_BUFFER) != NGX_OK) {
return NGX_ERROR;
}
b.last += n;
qc->received += n;
- rc = ngx_quic_input(c, &b, NULL, NULL);
+ rc = ngx_quic_input(c, &b, NULL);
if (rc == NGX_ERROR) {
ngx_quic_close_connection(c, NGX_ERROR);
static ngx_int_t
-ngx_quic_input(ngx_connection_t *c, ngx_buf_t *b, ngx_ssl_t *ssl,
- ngx_quic_conf_t *conf)
+ngx_quic_input(ngx_connection_t *c, ngx_buf_t *b, ngx_quic_conf_t *conf)
{
u_char *p;
ngx_int_t rc;
pkt.flags = p[0];
pkt.raw->pos++;
- rc = ngx_quic_process_packet(c, ssl, conf, &pkt);
+ rc = ngx_quic_process_packet(c, conf, &pkt);
if (rc == NGX_ERROR) {
return NGX_ERROR;
static ngx_int_t
-ngx_quic_process_packet(ngx_connection_t *c, ngx_ssl_t *ssl,
- ngx_quic_conf_t *conf, ngx_quic_header_t *pkt)
+ngx_quic_process_packet(ngx_connection_t *c, ngx_quic_conf_t *conf,
+ ngx_quic_header_t *pkt)
{
ngx_int_t rc;
ngx_ssl_conn_t *ssl_conn;
return NGX_ERROR;
}
- qc = ngx_quic_new_connection(c, ssl, conf, pkt);
+ qc = ngx_quic_new_connection(c, conf, pkt);
if (qc == NULL) {
return NGX_ERROR;
}
{ ngx_stream_quic_max_udp_payload_size };
static ngx_conf_num_bounds_t ngx_stream_quic_ack_delay_exponent_bounds =
{ ngx_conf_check_num_bounds, 0, 20 };
-static ngx_conf_num_bounds_t
+static ngx_conf_num_bounds_t
ngx_stream_quic_active_connection_id_limit_bounds =
{ ngx_conf_check_num_bounds, 2, -1 };
ngx_quic_conf_t *prev = parent;
ngx_quic_conf_t *conf = child;
+ ngx_stream_ssl_conf_t *scf;
+
ngx_conf_merge_msec_value(conf->tp.max_idle_timeout,
prev->tp.max_idle_timeout, 60000);
}
}
+ scf = ngx_stream_conf_get_module_srv_conf(cf, ngx_stream_ssl_module);
+ conf->ssl = &scf->ssl;
+
return NGX_CONF_OK;
}