Configure: unbreak with old OpenSSL, --with-http_v3_module added.

This commit is contained in:
Sergey Kandaurov 2020-04-30 15:47:43 +03:00
parent 8abc8b130f
commit 7a34d6e74a
5 changed files with 54 additions and 21 deletions

7
README
View File

@ -82,9 +82,10 @@ Experimental QUIC support for nginx
$ hg clone https://hg.nginx.org/nginx-quic
$ cd nginx-quic
$ ./auto/configure --with-debug --with-cc-opt="-I../boringssl/include" \
--with-ld-opt="-L../boringssl/build/ssl \
-L../boringssl/build/crypto"
$ ./auto/configure --with-debug --with-http_v3_module \
--with-cc-opt="-I../boringssl/include" \
--with-ld-opt="-L../boringssl/build/ssl \
-L../boringssl/build/crypto"
$ make
3. Configuration

View File

@ -141,11 +141,29 @@ END
fi
ngx_feature="OpenSSL QUIC support"
ngx_feature_name="NGX_OPENSSL_QUIC"
ngx_feature_run=no
ngx_feature_incs="#include <openssl/ssl.h>"
ngx_feature_path=
ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL"
ngx_feature_test="SSL_CTX_set_quic_method(NULL, NULL)"
. auto/feature
if [ $USE_OPENSSL_QUIC = YES ]; then
ngx_feature="OpenSSL QUIC support"
ngx_feature_name="NGX_OPENSSL_QUIC"
ngx_feature_run=no
ngx_feature_incs="#include <openssl/ssl.h>"
ngx_feature_path=
ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL"
ngx_feature_test="SSL_CTX_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
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.
END
exit 1
fi
fi

View File

@ -404,9 +404,13 @@ if [ $HTTP = YES ]; then
ngx_module_type=HTTP
if [ $HTTP_V3 = YES ]; then
USE_OPENSSL=YES
USE_OPENSSL_QUIC=YES
have=NGX_HTTP_V3 . auto/have
have=NGX_HTTP_HEADERS . auto/have
HTTP_SSL=YES
# XXX for Huffman
HTTP_V2=YES
@ -1265,19 +1269,24 @@ if [ $USE_OPENSSL = YES ]; then
ngx_module_type=CORE
ngx_module_name=ngx_openssl_module
ngx_module_incs=
ngx_module_deps="src/event/ngx_event_openssl.h \
src/event/ngx_event_quic.h \
src/event/ngx_event_quic_transport.h \
src/event/ngx_event_quic_protection.h"
ngx_module_srcs="src/event/ngx_event_openssl.c \
src/event/ngx_event_openssl_stapling.c \
src/event/ngx_event_quic.c \
src/event/ngx_event_quic_transport.c \
src/event/ngx_event_quic_protection.c"
ngx_module_deps=src/event/ngx_event_openssl.h
ngx_module_srcs="src/event/ngx_event_openssl.c
src/event/ngx_event_openssl_stapling.c"
ngx_module_libs=
ngx_module_link=YES
ngx_module_order=
if [ $USE_OPENSSL_QUIC = YES ]; then
ngx_module_deps="$ngx_module_deps \
src/event/ngx_event_quic.h \
src/event/ngx_event_quic_transport.h \
src/event/ngx_event_quic_protection.h"
ngx_module_srcs="$ngx_module_srcs \
src/event/ngx_event_quic.c \
src/event/ngx_event_quic_transport.c \
src/event/ngx_event_quic_protection.c"
fi
. auto/module
fi

View File

@ -59,7 +59,7 @@ HTTP_CHARSET=YES
HTTP_GZIP=YES
HTTP_SSL=NO
HTTP_V2=NO
HTTP_V3=YES
HTTP_V3=NO
HTTP_SSI=YES
HTTP_REALIP=NO
HTTP_XSLT=NO
@ -146,6 +146,7 @@ PCRE_CONF_OPT=
PCRE_JIT=NO
USE_OPENSSL=NO
USE_OPENSSL_QUIC=NO
OPENSSL=NONE
USE_ZLIB=NO
@ -225,6 +226,7 @@ $0: warning: the \"--with-ipv6\" option is deprecated"
--with-http_ssl_module) HTTP_SSL=YES ;;
--with-http_v2_module) HTTP_V2=YES ;;
--with-http_v3_module) HTTP_V3=YES ;;
--with-http_realip_module) HTTP_REALIP=YES ;;
--with-http_addition_module) HTTP_ADDITION=YES ;;
--with-http_xslt_module) HTTP_XSLT=YES ;;
@ -440,6 +442,7 @@ cat << END
--with-http_ssl_module enable ngx_http_ssl_module
--with-http_v2_module enable ngx_http_v2_module
--with-http_v3_module enable ngx_http_v3_module
--with-http_realip_module enable ngx_http_realip_module
--with-http_addition_module enable ngx_http_addition_module
--with-http_xslt_module enable ngx_http_xslt_module

View File

@ -84,10 +84,12 @@ typedef void (*ngx_connection_handler_pt)(ngx_connection_t *c);
#include <ngx_resolver.h>
#if (NGX_OPENSSL)
#include <ngx_event_openssl.h>
#if (NGX_OPENSSL_QUIC)
#include <ngx_event_quic.h>
#include <ngx_event_quic_transport.h>
#include <ngx_event_quic_protection.h>
#endif
#endif
#include <ngx_process_cycle.h>
#include <ngx_conf_file.h>
#include <ngx_module.h>