Mercurial > hg > nginx
comparison src/stream/ngx_stream_quic_module.c @ 8632:50f5c4f75fc1 quic
QUIC: added quic_stateless_reset_token_key Stream directive.
A similar directive is already available in HTTP.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 11 Nov 2020 19:39:23 +0000 |
parents | 279ad36f2f4b |
children | d8b01c2b8931 |
comparison
equal
deleted
inserted
replaced
8631:e167c7b4cff4 | 8632:50f5c4f75fc1 |
---|---|
122 { ngx_string("quic_retry"), | 122 { ngx_string("quic_retry"), |
123 NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_FLAG, | 123 NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_FLAG, |
124 ngx_conf_set_flag_slot, | 124 ngx_conf_set_flag_slot, |
125 NGX_STREAM_SRV_CONF_OFFSET, | 125 NGX_STREAM_SRV_CONF_OFFSET, |
126 offsetof(ngx_quic_conf_t, retry), | 126 offsetof(ngx_quic_conf_t, retry), |
127 NULL }, | |
128 | |
129 { ngx_string("quic_stateless_reset_token_key"), | |
130 NGX_STREAM_MAIN_CONF|NGX_STREAM_SRV_CONF|NGX_CONF_FLAG, | |
131 ngx_conf_set_str_slot, | |
132 NGX_STREAM_SRV_CONF_OFFSET, | |
133 offsetof(ngx_quic_conf_t, sr_token_key), | |
127 NULL }, | 134 NULL }, |
128 | 135 |
129 ngx_null_command | 136 ngx_null_command |
130 }; | 137 }; |
131 | 138 |
221 * conf->tp.original_dcid = { 0, NULL }; | 228 * conf->tp.original_dcid = { 0, NULL }; |
222 * conf->tp.initial_scid = { 0, NULL }; | 229 * conf->tp.initial_scid = { 0, NULL }; |
223 * conf->tp.retry_scid = { 0, NULL }; | 230 * conf->tp.retry_scid = { 0, NULL }; |
224 * conf->tp.stateless_reset_token = { 0 } | 231 * conf->tp.stateless_reset_token = { 0 } |
225 * conf->tp.preferred_address = NULL | 232 * conf->tp.preferred_address = NULL |
233 * conf->sr_token_key = { 0, NULL } | |
226 * conf->require_alpn = 0; | 234 * conf->require_alpn = 0; |
227 */ | 235 */ |
228 | 236 |
229 conf->tp.max_idle_timeout = NGX_CONF_UNSET_MSEC; | 237 conf->tp.max_idle_timeout = NGX_CONF_UNSET_MSEC; |
230 conf->tp.max_ack_delay = NGX_CONF_UNSET_MSEC; | 238 conf->tp.max_ack_delay = NGX_CONF_UNSET_MSEC; |
302 if (RAND_bytes(conf->token_key, sizeof(conf->token_key)) <= 0) { | 310 if (RAND_bytes(conf->token_key, sizeof(conf->token_key)) <= 0) { |
303 return NGX_CONF_ERROR; | 311 return NGX_CONF_ERROR; |
304 } | 312 } |
305 } | 313 } |
306 | 314 |
315 ngx_conf_merge_str_value(conf->sr_token_key, prev->sr_token_key, ""); | |
316 | |
307 scf = ngx_stream_conf_get_module_srv_conf(cf, ngx_stream_ssl_module); | 317 scf = ngx_stream_conf_get_module_srv_conf(cf, ngx_stream_ssl_module); |
308 conf->ssl = &scf->ssl; | 318 conf->ssl = &scf->ssl; |
309 | 319 |
310 return NGX_CONF_OK; | 320 return NGX_CONF_OK; |
311 } | 321 } |