Mercurial > hg > nginx
comparison src/stream/ngx_stream_ssl_module.c @ 9106:113e2438dbd4 quic
Stream: removed QUIC support.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Sun, 14 May 2023 12:05:35 +0400 |
parents | 0af598651e33 |
children |
comparison
equal
deleted
inserted
replaced
9105:8057e053480a | 9106:113e2438dbd4 |
---|---|
6 | 6 |
7 | 7 |
8 #include <ngx_config.h> | 8 #include <ngx_config.h> |
9 #include <ngx_core.h> | 9 #include <ngx_core.h> |
10 #include <ngx_stream.h> | 10 #include <ngx_stream.h> |
11 | |
12 #if (NGX_QUIC_OPENSSL_COMPAT) | |
13 #include <ngx_event_quic_openssl_compat.h> | |
14 #endif | |
15 | 11 |
16 | 12 |
17 typedef ngx_int_t (*ngx_ssl_variable_handler_pt)(ngx_connection_t *c, | 13 typedef ngx_int_t (*ngx_ssl_variable_handler_pt)(ngx_connection_t *c, |
18 ngx_pool_t *pool, ngx_str_t *s); | 14 ngx_pool_t *pool, ngx_str_t *s); |
19 | 15 |
1197 | 1193 |
1198 | 1194 |
1199 static ngx_int_t | 1195 static ngx_int_t |
1200 ngx_stream_ssl_init(ngx_conf_t *cf) | 1196 ngx_stream_ssl_init(ngx_conf_t *cf) |
1201 { | 1197 { |
1202 ngx_uint_t i; | |
1203 ngx_stream_listen_t *listen; | |
1204 ngx_stream_handler_pt *h; | 1198 ngx_stream_handler_pt *h; |
1205 ngx_stream_ssl_conf_t *scf; | |
1206 ngx_stream_core_main_conf_t *cmcf; | 1199 ngx_stream_core_main_conf_t *cmcf; |
1207 | 1200 |
1208 cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module); | 1201 cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module); |
1209 | 1202 |
1210 h = ngx_array_push(&cmcf->phases[NGX_STREAM_SSL_PHASE].handlers); | 1203 h = ngx_array_push(&cmcf->phases[NGX_STREAM_SSL_PHASE].handlers); |
1212 return NGX_ERROR; | 1205 return NGX_ERROR; |
1213 } | 1206 } |
1214 | 1207 |
1215 *h = ngx_stream_ssl_handler; | 1208 *h = ngx_stream_ssl_handler; |
1216 | 1209 |
1217 listen = cmcf->listen.elts; | |
1218 | |
1219 for (i = 0; i < cmcf->listen.nelts; i++) { | |
1220 if (!listen[i].quic) { | |
1221 continue; | |
1222 } | |
1223 | |
1224 scf = listen[i].ctx->srv_conf[ngx_stream_ssl_module.ctx_index]; | |
1225 | |
1226 #if (NGX_QUIC_OPENSSL_COMPAT) | |
1227 if (ngx_quic_compat_init(cf, scf->ssl.ctx) != NGX_OK) { | |
1228 return NGX_ERROR; | |
1229 } | |
1230 #endif | |
1231 | |
1232 if (scf->certificates && !(scf->protocols & NGX_SSL_TLSv1_3)) { | |
1233 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, | |
1234 "\"ssl_protocols\" must enable TLSv1.3 for " | |
1235 "the \"listen ... quic\" directive in %s:%ui", | |
1236 scf->file, scf->line); | |
1237 return NGX_ERROR; | |
1238 } | |
1239 } | |
1240 | |
1241 return NGX_OK; | 1210 return NGX_OK; |
1242 } | 1211 } |