summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-10-29 16:48:53 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2020-10-29 16:49:35 -0400
commitbcac9b5785f1427d03a3b9ec5ad173bd10ddc823 (patch)
tree42e29f1da022abde47072d6e1d45501932df6d1d
parent8187e988971725039364d685ab446bc11c859d40 (diff)
downloadlighttpd-git-bcac9b5785f1427d03a3b9ec5ad173bd10ddc823.tar.gz
[core] set NSS_VER_INCLUDE after crypto lib select
-rw-r--r--src/sys-crypto-md.h6
-rw-r--r--src/sys-crypto.h5
2 files changed, 6 insertions, 5 deletions
diff --git a/src/sys-crypto-md.h b/src/sys-crypto-md.h
index 80bc7aef..c8a9e1ce 100644
--- a/src/sys-crypto-md.h
+++ b/src/sys-crypto-md.h
@@ -579,6 +579,12 @@ SHA256_Update(SHA256_CTX *ctx, const void *data, size_t length)
#elif defined(USE_NSS_CRYPTO)
+#ifdef __has_include
+#if __has_include(<nss3/nss.h>)
+#define NSS_VER_INCLUDE
+#endif
+#endif
+
/* basic algorithms fail if NSS library has not been init'd (WTH).
* lighttpd defers initialization of rand and crypto until first use
* to attempt to avoid long, blocking init at startup while waiting
diff --git a/src/sys-crypto.h b/src/sys-crypto.h
index a84047b4..1eb13fea 100644
--- a/src/sys-crypto.h
+++ b/src/sys-crypto.h
@@ -20,11 +20,6 @@
#ifdef HAVE_NSS3_NSS_H
#define USE_LIB_CRYPTO
#define USE_NSS_CRYPTO
-#ifdef __has_include
-#if __has_include(<nss3/nss.h>)
-#define NSS_VER_INCLUDE
-#endif
-#endif
#endif
#ifdef HAVE_NSS_NSS_H
#define USE_LIB_CRYPTO