Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic.c @ 7698: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 |
comparison
equal
deleted
inserted
replaced
7697:78540e2160d0 | 7698:253cf267f95a |
---|---|
124 ngx_quic_flush_flight, | 124 ngx_quic_flush_flight, |
125 ngx_quic_send_alert, | 125 ngx_quic_send_alert, |
126 }; | 126 }; |
127 | 127 |
128 | 128 |
129 void | |
130 ngx_quic_init_ssl_methods(SSL_CTX* ctx) | |
131 { | |
132 SSL_CTX_set_quic_method(ctx, &quic_method); | |
133 } | |
134 | |
135 | |
136 #if BORINGSSL_API_VERSION >= 10 | 129 #if BORINGSSL_API_VERSION >= 10 |
137 | 130 |
138 static int | 131 static int |
139 ngx_quic_set_read_secret(ngx_ssl_conn_t *ssl_conn, | 132 ngx_quic_set_read_secret(ngx_ssl_conn_t *ssl_conn, |
140 enum ssl_encryption_level_t level, const SSL_CIPHER *cipher, | 133 enum ssl_encryption_level_t level, const SSL_CIPHER *cipher, |
408 return NGX_ERROR; | 401 return NGX_ERROR; |
409 } | 402 } |
410 | 403 |
411 ssl_conn = c->ssl->connection; | 404 ssl_conn = c->ssl->connection; |
412 | 405 |
406 if (SSL_set_quic_method(ssl_conn, &quic_method) == 0) { | |
407 ngx_log_error(NGX_LOG_INFO, c->log, 0, | |
408 "SSL_set_quic_method() failed"); | |
409 return NGX_ERROR; | |
410 } | |
411 | |
413 if (SSL_set_quic_transport_params(ssl_conn, params, sizeof(params) - 1) == 0) { | 412 if (SSL_set_quic_transport_params(ssl_conn, params, sizeof(params) - 1) == 0) { |
414 ngx_log_error(NGX_LOG_INFO, c->log, 0, | 413 ngx_log_error(NGX_LOG_INFO, c->log, 0, |
415 "SSL_set_quic_transport_params() failed"); | 414 "SSL_set_quic_transport_params() failed"); |
416 return NGX_ERROR; | 415 return NGX_ERROR; |
417 } | 416 } |