aboutsummaryrefslogtreecommitdiff
path: root/auto
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 /auto
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 'auto')
-rw-r--r--auto/lib/openssl/conf54
-rw-r--r--auto/modules6
2 files changed, 34 insertions, 26 deletions
diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf
index 9ab062091..cfa74cf81 100644
--- a/auto/lib/openssl/conf
+++ b/auto/lib/openssl/conf
@@ -10,6 +10,7 @@ if [ $OPENSSL != NONE ]; then
if [ $USE_OPENSSL_QUIC = YES ]; then
have=NGX_QUIC . auto/have
+ have=NGX_QUIC_OPENSSL_COMPAT . auto/have
fi
case "$CC" in
@@ -124,6 +125,35 @@ else
CORE_INCS="$CORE_INCS $ngx_feature_path"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
OPENSSL=YES
+
+ if [ $USE_OPENSSL_QUIC = YES ]; then
+
+ ngx_feature="OpenSSL QUIC support"
+ ngx_feature_name="NGX_QUIC"
+ ngx_feature_test="SSL_set_quic_method(NULL, NULL)"
+ . auto/feature
+
+ if [ $ngx_found = no ]; then
+ have=NGX_QUIC_OPENSSL_COMPAT . auto/have
+
+ ngx_feature="OpenSSL QUIC compatibility"
+ ngx_feature_test="SSL_CTX_add_custom_ext(NULL, 0, 0,
+ NULL, NULL, NULL, NULL, NULL)"
+ . auto/feature
+ fi
+
+ if [ $ngx_found = no ]; then
+cat << END
+
+$0: error: certain modules require OpenSSL QUIC support.
+You can either do not enable the modules, or install the OpenSSL library with
+QUIC support into the system, or build the OpenSSL library with QUIC support
+statically from the source with nginx by using --with-openssl=<path> option.
+
+END
+ exit 1
+ fi
+ fi
fi
fi
@@ -140,28 +170,4 @@ END
exit 1
fi
- if [ $USE_OPENSSL_QUIC = YES ]; then
-
- ngx_feature="OpenSSL QUIC support"
- ngx_feature_name="NGX_QUIC"
- ngx_feature_run=no
- ngx_feature_incs="#include <openssl/ssl.h>"
- ngx_feature_path=
- ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD"
- ngx_feature_test="SSL_set_quic_method(NULL, NULL)"
- . auto/feature
-
- if [ $ngx_found = no ]; then
-
-cat << END
-
-$0: error: certain modules require OpenSSL QUIC support.
-You can either do not enable the modules, or install the OpenSSL library with
-QUIC support into the system, or build the OpenSSL library with QUIC support
-statically from the source with nginx by using --with-openssl=<path> option.
-
-END
- exit 1
- fi
- fi
fi
diff --git a/auto/modules b/auto/modules
index 575fff0b7..08a33cacc 100644
--- a/auto/modules
+++ b/auto/modules
@@ -1342,7 +1342,8 @@ if [ $USE_OPENSSL_QUIC = YES ]; then
src/event/quic/ngx_event_quic_tokens.h \
src/event/quic/ngx_event_quic_ack.h \
src/event/quic/ngx_event_quic_output.h \
- src/event/quic/ngx_event_quic_socket.h"
+ src/event/quic/ngx_event_quic_socket.h \
+ src/event/quic/ngx_event_quic_openssl_compat.h"
ngx_module_srcs="src/event/quic/ngx_event_quic.c \
src/event/quic/ngx_event_quic_udp.c \
src/event/quic/ngx_event_quic_transport.c \
@@ -1355,7 +1356,8 @@ if [ $USE_OPENSSL_QUIC = YES ]; then
src/event/quic/ngx_event_quic_tokens.c \
src/event/quic/ngx_event_quic_ack.c \
src/event/quic/ngx_event_quic_output.c \
- src/event/quic/ngx_event_quic_socket.c"
+ src/event/quic/ngx_event_quic_socket.c \
+ src/event/quic/ngx_event_quic_openssl_compat.c"
ngx_module_libs=
ngx_module_link=YES