summaryrefslogtreecommitdiff
path: root/src/sys-crypto-md.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-10-22 00:48:40 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2020-10-22 00:48:40 -0400
commit033209393e69206f3eeef61d629f5ecc2ea98f17 (patch)
tree6ed76f2c905ca4710783a319feb69b93d281f0eb /src/sys-crypto-md.h
parentfef1a9450976769d6645437b462e8075dffd3542 (diff)
downloadlighttpd-git-033209393e69206f3eeef61d629f5ecc2ea98f17.tar.gz
[multiple] test for nss includes
some distro packages deploy NSS includes under nss/, others nss3/ (and similar for nspr/ vs nspr4/)
Diffstat (limited to 'src/sys-crypto-md.h')
-rw-r--r--src/sys-crypto-md.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sys-crypto-md.h b/src/sys-crypto-md.h
index db1247dd..555b47cd 100644
--- a/src/sys-crypto-md.h
+++ b/src/sys-crypto-md.h
@@ -575,7 +575,11 @@ SHA256_Update(SHA256_CTX *ctx, const void *data, size_t length)
* lighttpd defers initialization of rand and crypto until first use
* to attempt to avoid long, blocking init at startup while waiting
* for sufficient system entropy to become available */
+#ifdef NSS_VER_INCLUDE
#include <nss3/nss.h> /* NSS_IsInitialized() NSS_NoDB_Init() */
+#else
+#include <nss/nss.h> /* NSS_IsInitialized() NSS_NoDB_Init() */
+#endif
#include <stdlib.h> /* abort() */
__attribute_cold__
static inline void
@@ -585,7 +589,11 @@ nss_requires_explicit_init_for_basic_crypto_wth(void)
abort();
}
+#ifdef NSS_VER_INCLUDE
#include <nss3/sechash.h>
+#else
+#include <nss/sechash.h>
+#endif
#define NSS_gen_hashfuncs(name, typ) \
static inline int \