diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2020-04-30 15:47:43 +0300 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2020-04-30 15:47:43 +0300 |
commit | b7b3aca7040a0c734a555efd8775249a29b5ac5d (patch) | |
tree | 37ec644c5c4719a7efa4ad79af7e731b0d2488af | |
parent | be478232480f29309e876d2b06c6737fb03dacba (diff) | |
download | nginx-b7b3aca7040a0c734a555efd8775249a29b5ac5d.tar.gz nginx-b7b3aca7040a0c734a555efd8775249a29b5ac5d.zip |
Configure: unbreak with old OpenSSL, --with-http_v3_module added.
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | auto/lib/openssl/conf | 34 | ||||
-rw-r--r-- | auto/modules | 27 | ||||
-rw-r--r-- | auto/options | 5 | ||||
-rw-r--r-- | src/core/ngx_core.h | 2 |
5 files changed, 54 insertions, 21 deletions
@@ -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 diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf index 4f4390e11..faebd8fa4 100644 --- a/auto/lib/openssl/conf +++ b/auto/lib/openssl/conf @@ -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 diff --git a/auto/modules b/auto/modules index abd3aa4b9..67339e7fa 100644 --- a/auto/modules +++ b/auto/modules @@ -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 diff --git a/auto/options b/auto/options index de1634462..ddb861783 100644 --- a/auto/options +++ b/auto/options @@ -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 diff --git a/src/core/ngx_core.h b/src/core/ngx_core.h index eb3acd663..a8959ddcc 100644 --- a/src/core/ngx_core.h +++ b/src/core/ngx_core.h @@ -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> |