xref: /lighttpd1.4/src/sys-crypto.h (revision 0a2aab88)
1 #ifndef LI_SYS_CRYPTO_H
2 #define LI_SYS_CRYPTO_H
3 #include "first.h"
4 
5 #if defined HAVE_LIBSSL && defined HAVE_OPENSSL_SSL_H
6 #define USE_LIB_CRYPTO
7 #define USE_OPENSSL_CRYPTO
8 #endif
9 
10 #ifndef USE_OPENSSL_CRYPTO
11 #ifdef HAVE_WOLFSSL_SSL_H
12 #define USE_LIB_CRYPTO
13 #define USE_WOLFSSL_CRYPTO
14 /* wolfSSL needs to be built with ./configure --enable-lighty for lighttpd.
15  * Doing so defines OPENSSL_EXTRA and HAVE_LIGHTY in <wolfssl/options.h>, and
16  * these defines are necessary for wolfSSL headers to expose sufficient openssl
17  * compatibility layer for wolfSSL to be able to provide an openssl substitute
18  * for use by lighttpd */
19 #include <wolfssl/options.h>
20 #endif
21 #endif
22 
23 #ifdef HAVE_LIBMBEDCRYPTO
24 #define USE_LIB_CRYPTO
25 #define USE_MBEDTLS_CRYPTO
26 #include <mbedtls/config.h>
27 #endif
28 
29 #ifdef HAVE_NSS3_NSS_H
30 #define USE_LIB_CRYPTO
31 #define USE_NSS_CRYPTO
32 #ifdef __has_include
33 #if __has_include(<nss3/nss.h>)
34 #define NSS_VER_INCLUDE
35 #endif
36 #endif
37 #endif
38 
39 #ifdef HAVE_NETTLE_NETTLE_TYPES_H
40 #define USE_LIB_CRYPTO
41 #define USE_NETTLE_CRYPTO
42 #endif
43 
44 #ifdef HAVE_GNUTLS_CRYPTO_H
45 #define USE_LIB_CRYPTO
46 #define USE_GNUTLS_CRYPTO
47 #endif
48 
49 #endif
50