[njs] Introducing --no-openssl to disable OpenSSL discover.

Dmitry Volyntsev xeioex at nginx.com
Fri Dec 24 16:58:39 UTC 2021


details:   https://hg.nginx.org/njs/rev/4ff1c16a652a
branches:  
changeset: 1782:4ff1c16a652a
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Fri Dec 24 15:48:09 2021 +0000
description:
Introducing --no-openssl to disable OpenSSL discover.

diffstat:

 auto/modules      |   2 +-
 auto/openssl      |  57 +++++++++++++++++++++++++++---------------------------
 auto/options      |   4 +-
 nginx/config.make |   2 +-
 4 files changed, 33 insertions(+), 32 deletions(-)

diffs (116 lines):

diff -r 1d95f84bc0ce -r 4ff1c16a652a auto/modules
--- a/auto/modules	Fri Dec 24 15:48:08 2021 +0000
+++ b/auto/modules	Fri Dec 24 15:48:09 2021 +0000
@@ -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
diff -r 1d95f84bc0ce -r 4ff1c16a652a auto/openssl
--- a/auto/openssl	Fri Dec 24 15:48:08 2021 +0000
+++ b/auto/openssl	Fri Dec 24 15:48:09 2021 +0000
@@ -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
diff -r 1d95f84bc0ce -r 4ff1c16a652a auto/options
--- a/auto/options	Fri Dec 24 15:48:08 2021 +0000
+++ b/auto/options	Fri Dec 24 15:48:09 2021 +0000
@@ -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)
diff -r 1d95f84bc0ce -r 4ff1c16a652a nginx/config.make
--- a/nginx/config.make	Fri Dec 24 15:48:08 2021 +0000
+++ b/nginx/config.make	Fri Dec 24 15:48:09 2021 +0000
@@ -3,7 +3,7 @@ cat << END                              
 $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


More information about the nginx-devel mailing list