]> git.kaiwu.me - njs.git/commitdiff
Introducing --no-openssl to disable OpenSSL discover.
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 24 Dec 2021 15:48:09 +0000 (15:48 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Fri, 24 Dec 2021 15:48:09 +0000 (15:48 +0000)
auto/modules
auto/openssl
auto/options
nginx/config.make

index 4d46c664f99ddd00c2698c0ea6797ce4ce08b199..5f20cc6f7e45c4a789acc33987ea0755755c2ae6 100644 (file)
@@ -13,7 +13,7 @@ njs_module_srcs=external/njs_crypto.c
 
 . auto/module
 
-if [ $NJS_WEBCRYPTO = YES -a $NJS_HAVE_OPENSSL = YES ]; then
+if [ $NJS_OPENSSL = YES -a $NJS_HAVE_OPENSSL = YES ]; then
        njs_module_name=njs_webcrypto_module
        njs_module_incs=
        njs_module_srcs=external/njs_webcrypto.c
index a81efdd728f5fc523246e2c7308f4b07333623e3..adca588798b4f70782989a17accff12a18e53b9f 100644 (file)
@@ -6,38 +6,39 @@
 NJS_OPENSSL_LIB=
 NJS_HAVE_OPENSSL=NO
 
+if [ $NJS_OPENSSL = YES ]; then
+    njs_found=no
 
-njs_found=no
+    njs_feature="OpenSSL library"
+    njs_feature_name=NJS_HAVE_OPENSSL
+    njs_feature_run=yes
+    njs_feature_incs=
+    njs_feature_libs="-lcrypto"
+    njs_feature_test="#include <openssl/evp.h>
 
+                      int main() {
+                          EVP_CIPHER_CTX  *ctx;
+                          ctx = EVP_CIPHER_CTX_new();
+                          EVP_CIPHER_CTX_free(ctx);
+                          return 0;
+                     }"
+    . auto/feature
 
-njs_feature="OpenSSL library"
-njs_feature_name=NJS_HAVE_OPENSSL
-njs_feature_run=yes
-njs_feature_incs=
-njs_feature_libs="-lcrypto"
-njs_feature_test="#include <openssl/evp.h>
-
-                  int main() {
-                      EVP_CIPHER_CTX  *ctx;
-                      ctx = EVP_CIPHER_CTX_new();
-                      EVP_CIPHER_CTX_free(ctx);
-                      return 0;
-                 }"
-. auto/feature
 
+    if [ $njs_found = yes ]; then
+        njs_feature="OpenSSL version"
+        njs_feature_name=NJS_OPENSSL_VERSION
+        njs_feature_run=value
+        njs_feature_test="#include <openssl/ssl.h>
 
-if [ $njs_found = yes ]; then
-    njs_feature="OpenSSL version"
-    njs_feature_name=NJS_OPENSSL_VERSION
-    njs_feature_run=value
-    njs_feature_test="#include <openssl/ssl.h>
+                          int main() {
+                              printf(\"\\\"%s\\\"\", OPENSSL_VERSION_TEXT);
+                              return 0;
+                          }"
+        . auto/feature
 
-                      int main() {
-                          printf(\"\\\"%s\\\"\", OPENSSL_VERSION_TEXT);
-                          return 0;
-                      }"
-    . auto/feature
+        NJS_HAVE_OPENSSL=YES
+        NJS_OPENSSL_LIB="$njs_feature_libs"
+    fi
 
-    NJS_HAVE_OPENSSL=YES
-    NJS_OPENSSL_LIB="$njs_feature_libs"
 fi
index 11c1ff0c1b83d38fa8fd3cd93ff257db7db5da94..c4282280133cbccc44f78ffbbf3716ca0b04ae0a 100644 (file)
@@ -11,7 +11,7 @@ NJS_DEBUG_MEMORY=NO
 NJS_ADDRESS_SANITIZER=NO
 NJS_TEST262=YES
 
-NJS_WEBCRYPTO=YES
+NJS_OPENSSL=YES
 NJS_TRY_PCRE2=YES
 
 NJS_CONFIGURE_OPTIONS=
@@ -34,7 +34,7 @@ do
         --debug-memory=*)                NJS_DEBUG_MEMORY="$value"           ;;
         --test262=*)                     NJS_TEST262="$value"                ;;
 
-        --no-webcrypto)                  NJS_WEBCRYPTO=NO                    ;;
+        --no-openssl)                    NJS_OPENSSL=NO                      ;;
         --no-pcre2)                      NJS_TRY_PCRE2=NO                    ;;
 
         --help)
index 30f88d8149899e11d93f49a458b0da1d85c07d42..7210c0da621c7e044e601e294e50a2e2573e3421 100644 (file)
@@ -3,7 +3,7 @@ cat << END                                            >> $NGX_MAKEFILE
 $ngx_addon_dir/../build/libnjs.a: $NGX_MAKEFILE
        cd $ngx_addon_dir/.. \\
        && if [ -f build/Makefile ]; then \$(MAKE) clean; fi \\
-       && CFLAGS="\$(CFLAGS)" CC="\$(CC)" ./configure --no-webcrypto --no-pcre2 \\
+       && CFLAGS="\$(CFLAGS)" CC="\$(CC)" ./configure --no-openssl --no-pcre2 \\
        && \$(MAKE)
 
 END