summaryrefslogtreecommitdiffhomepage
path: root/src/event/ngx_event_quic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/event/ngx_event_quic.c')
-rw-r--r--src/event/ngx_event_quic.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c
index 7f732ba8b..b77ae0f0c 100644
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -126,13 +126,6 @@ static SSL_QUIC_METHOD quic_method = {
};
-void
-ngx_quic_init_ssl_methods(SSL_CTX* ctx)
-{
- SSL_CTX_set_quic_method(ctx, &quic_method);
-}
-
-
#if BORINGSSL_API_VERSION >= 10
static int
@@ -410,6 +403,12 @@ ngx_quic_init_connection(ngx_connection_t *c)
ssl_conn = c->ssl->connection;
+ if (SSL_set_quic_method(ssl_conn, &quic_method) == 0) {
+ ngx_log_error(NGX_LOG_INFO, c->log, 0,
+ "SSL_set_quic_method() failed");
+ return NGX_ERROR;
+ }
+
if (SSL_set_quic_transport_params(ssl_conn, params, sizeof(params) - 1) == 0) {
ngx_log_error(NGX_LOG_INFO, c->log, 0,
"SSL_set_quic_transport_params() failed");