# HG changeset patch # User Sergey Kandaurov # Date 1588250863 -10800 # Node ID 0e6528551f260072c662fc9dc8382e630863ecfc # Parent 9d9531431c8c425ebffd9d27c38ad33f59633c74 Configure: unbreak with old OpenSSL, --with-http_v3_module added. diff --git a/README b/README --- a/README +++ b/README @@ -82,9 +82,10 @@ 2. Installing $ 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 --- 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 " -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 " + 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= option. + +END + exit 1 + fi + +fi diff --git a/auto/modules b/auto/modules --- 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 --- 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 @@ do --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 --- a/src/core/ngx_core.h +++ b/src/core/ngx_core.h @@ -84,10 +84,12 @@ typedef void (*ngx_connection_handler_pt #include #if (NGX_OPENSSL) #include +#if (NGX_OPENSSL_QUIC) #include #include #include #endif +#endif #include #include #include