Mercurial > hg > nginx
comparison src/stream/ngx_stream_proxy_module.c @ 9021:8d0753760546 quic
Merged with the default branch.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 22 Jun 2022 18:34:58 +0400 |
parents | b4c7853b0488 457afc332c67 |
children | b30bec3d71d6 |
comparison
equal
deleted
inserted
replaced
9020:efbcdb9b37dc | 9021:8d0753760546 |
---|---|
1067 ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR); | 1067 ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR); |
1068 return; | 1068 return; |
1069 } | 1069 } |
1070 } | 1070 } |
1071 | 1071 |
1072 if (pscf->ssl_certificate && (pscf->ssl_certificate->lengths | 1072 if (pscf->ssl_certificate |
1073 || pscf->ssl_certificate_key->lengths)) | 1073 && pscf->ssl_certificate->value.len |
1074 && (pscf->ssl_certificate->lengths | |
1075 || pscf->ssl_certificate_key->lengths)) | |
1074 { | 1076 { |
1075 if (ngx_stream_proxy_ssl_certificate(s) != NGX_OK) { | 1077 if (ngx_stream_proxy_ssl_certificate(s) != NGX_OK) { |
1076 ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR); | 1078 ngx_stream_proxy_finalize(s, NGX_STREAM_INTERNAL_SERVER_ERROR); |
1077 return; | 1079 return; |
1078 } | 1080 } |
1733 cl->buf->last = b->last + n; | 1735 cl->buf->last = b->last + n; |
1734 cl->buf->tag = (ngx_buf_tag_t) &ngx_stream_proxy_module; | 1736 cl->buf->tag = (ngx_buf_tag_t) &ngx_stream_proxy_module; |
1735 | 1737 |
1736 cl->buf->temporary = (n ? 1 : 0); | 1738 cl->buf->temporary = (n ? 1 : 0); |
1737 cl->buf->last_buf = src->read->eof; | 1739 cl->buf->last_buf = src->read->eof; |
1738 cl->buf->flush = 1; | 1740 cl->buf->flush = !src->read->eof; |
1739 | 1741 |
1740 (*packets)++; | 1742 (*packets)++; |
1741 *received += n; | 1743 *received += n; |
1742 b->last += n; | 1744 b->last += n; |
1743 do_write = 1; | 1745 do_write = 1; |
2238 | 2240 |
2239 if (ngx_ssl_ciphers(cf, pscf->ssl, &pscf->ssl_ciphers, 0) != NGX_OK) { | 2241 if (ngx_ssl_ciphers(cf, pscf->ssl, &pscf->ssl_ciphers, 0) != NGX_OK) { |
2240 return NGX_ERROR; | 2242 return NGX_ERROR; |
2241 } | 2243 } |
2242 | 2244 |
2243 if (pscf->ssl_certificate) { | 2245 if (pscf->ssl_certificate |
2244 | 2246 && pscf->ssl_certificate->value.len) |
2247 { | |
2245 if (pscf->ssl_certificate_key == NULL) { | 2248 if (pscf->ssl_certificate_key == NULL) { |
2246 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, | 2249 ngx_log_error(NGX_LOG_EMERG, cf->log, 0, |
2247 "no \"proxy_ssl_certificate_key\" is defined " | 2250 "no \"proxy_ssl_certificate_key\" is defined " |
2248 "for certificate \"%V\"", | 2251 "for certificate \"%V\"", |
2249 &pscf->ssl_certificate->value); | 2252 &pscf->ssl_certificate->value); |