aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_ssl_module.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2023-02-22 19:16:53 +0400
committerRoman Arutyunyan <arut@nginx.com>2023-02-22 19:16:53 +0400
commita36ebf7e95baebf445b0973bd270bc009b0b0e9a (patch)
tree28f396ec4a7a6a828a8ee3e7f05b5e56ebbfecf4 /src/http/modules/ngx_http_ssl_module.c
parent76adb919138225b24280bc477ff468fd13cc9e62 (diff)
downloadnginx-a36ebf7e95baebf445b0973bd270bc009b0b0e9a.tar.gz
nginx-a36ebf7e95baebf445b0973bd270bc009b0b0e9a.zip
QUIC: OpenSSL compatibility layer.
The change allows to compile QUIC with OpenSSL which lacks BoringSSL QUIC API. This implementation does not support 0-RTT.
Diffstat (limited to 'src/http/modules/ngx_http_ssl_module.c')
-rw-r--r--src/http/modules/ngx_http_ssl_module.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c
index 265cb3162..62ec13cf0 100644
--- a/src/http/modules/ngx_http_ssl_module.c
+++ b/src/http/modules/ngx_http_ssl_module.c
@@ -9,6 +9,10 @@
#include <ngx_core.h>
#include <ngx_http.h>
+#if (NGX_QUIC_OPENSSL_COMPAT)
+#include <ngx_event_quic_openssl_compat.h>
+#endif
+
typedef ngx_int_t (*ngx_ssl_variable_handler_pt)(ngx_connection_t *c,
ngx_pool_t *pool, ngx_str_t *s);
@@ -1317,16 +1321,22 @@ ngx_http_ssl_init(ngx_conf_t *cf)
continue;
}
+ cscf = addr[a].default_server;
+ sscf = cscf->ctx->srv_conf[ngx_http_ssl_module.ctx_index];
+
if (addr[a].opt.http3) {
name = "http3";
+#if (NGX_QUIC_OPENSSL_COMPAT)
+ if (ngx_quic_compat_init(cf, sscf->ssl.ctx) != NGX_OK) {
+ return NGX_ERROR;
+ }
+#endif
+
} else {
name = "ssl";
}
- cscf = addr[a].default_server;
- sscf = cscf->ctx->srv_conf[ngx_http_ssl_module.ctx_index];
-
if (sscf->certificates) {
if (addr[a].opt.http3 && !(sscf->protocols & NGX_SSL_TLSv1_3)) {