Mercurial > hg > nginx
diff src/event/ngx_event_quic.c @ 8232:253cf267f95a quic
Moved setting QUIC methods to runtime.
This allows listening to both https and http3 in the same server.
Also, the change eliminates the ssl_quic directive.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 18 Mar 2020 16:37:16 +0300 |
parents | 78540e2160d0 |
children | 19bb9edcd8bd |
line wrap: on
line diff
--- a/src/event/ngx_event_quic.c Wed Mar 18 16:35:11 2020 +0300 +++ b/src/event/ngx_event_quic.c Wed Mar 18 16:37:16 2020 +0300 @@ -126,13 +126,6 @@ }; -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 @@ 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");