lighttpd 1.4.x https://www.lighttpd.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.6 KiB

  1. #ifndef LI_SYS_CRYPTO_H
  2. #define LI_SYS_CRYPTO_H
  3. #include "first.h"
  4. #if defined HAVE_LIBSSL && defined HAVE_OPENSSL_SSL_H
  5. #define USE_LIB_CRYPTO
  6. #define USE_OPENSSL_CRYPTO
  7. #endif
  8. #ifndef USE_OPENSSL_CRYPTO
  9. #ifdef HAVE_WOLFSSL_SSL_H
  10. #define USE_LIB_CRYPTO
  11. #define USE_WOLFSSL_CRYPTO
  12. /* wolfSSL needs to be built with ./configure --enable-lighty for lighttpd.
  13. * Doing so defines OPENSSL_EXTRA and HAVE_LIGHTY in <wolfssl/options.h>, and
  14. * these defines are necessary for wolfSSL headers to expose sufficient openssl
  15. * compatibility layer for wolfSSL to be able to provide an openssl substitute
  16. * for use by lighttpd */
  17. #include <wolfssl/options.h>
  18. /* workaround fragile code in wolfssl/wolfcrypto/types.h */
  19. #ifdef __SIZEOF_LONG__
  20. #ifndef SIZEOF_LONG
  21. #define SIZEOF_LONG __SIZEOF_LONG__
  22. #endif
  23. #endif
  24. #ifdef __SIZEOF_LONG_LONG__
  25. #ifndef SIZEOF_LONG_LONG
  26. #define SIZEOF_LONG_LONG __SIZEOF_LONG_LONG__
  27. #endif
  28. #endif
  29. #if !defined(SIZEOF_LONG) || !defined(SIZEOF_LONG_LONG)
  30. #undef SIZEOF_LONG
  31. #undef SIZEOF_LONG_LONG
  32. #endif
  33. #endif
  34. #endif
  35. #ifdef HAVE_LIBMBEDCRYPTO
  36. #define USE_LIB_CRYPTO
  37. #define USE_MBEDTLS_CRYPTO
  38. #endif
  39. #ifdef HAVE_NSS3_NSS_H
  40. #define USE_LIB_CRYPTO
  41. #define USE_NSS_CRYPTO
  42. #ifdef __has_include
  43. #if __has_include(<nss3/nss.h>)
  44. #define NSS_VER_INCLUDE
  45. #endif
  46. #endif
  47. #endif
  48. #ifdef HAVE_NSS_NSS_H
  49. #define USE_LIB_CRYPTO
  50. #define USE_NSS_CRYPTO
  51. #endif
  52. #ifdef HAVE_NETTLE_NETTLE_TYPES_H
  53. #define USE_LIB_CRYPTO
  54. #define USE_NETTLE_CRYPTO
  55. #endif
  56. #ifdef HAVE_GNUTLS_CRYPTO_H
  57. #define USE_LIB_CRYPTO
  58. #define USE_GNUTLS_CRYPTO
  59. #endif
  60. #ifdef WITHOUT_LIB_CRYPTO
  61. #undef USE_LIB_CRYPTO
  62. #endif
  63. #endif