conf-ssl.h 993 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * ngIRCd -- The Next Generation IRC Daemon
  3. */
  4. #ifndef conf_ssl_h
  5. #define conf_ssl_h
  6. /**
  7. * @file
  8. * SSL related definitions
  9. */
  10. #ifdef HAVE_LIBSSL
  11. #define SSL_SUPPORT
  12. #include <openssl/ssl.h>
  13. #endif
  14. #ifdef HAVE_LIBGNUTLS
  15. #define SSL_SUPPORT
  16. #include <gnutls/gnutls.h>
  17. #ifndef LIBGNUTLS_VERSION_MAJOR
  18. #define gnutls_certificate_credentials_t gnutls_certificate_credentials
  19. #define gnutls_cipher_algorithm_t gnutls_cipher_algorithm
  20. #define gnutls_datum_t gnutls_datum
  21. #define gnutls_dh_params_t gnutls_dh_params
  22. #define gnutls_session_t gnutls_session
  23. #define gnutls_transport_ptr_t gnutls_transport_ptr
  24. #endif
  25. #endif
  26. #ifdef SSL_SUPPORT
  27. struct ConnSSL_State {
  28. #ifdef HAVE_LIBSSL
  29. SSL *ssl;
  30. #endif
  31. #ifdef HAVE_LIBGNUTLS
  32. gnutls_session_t gnutls_session;
  33. void *cookie; /* pointer to server configuration structure
  34. (for outgoing connections), or NULL. */
  35. #endif
  36. char *fingerprint;
  37. };
  38. #endif
  39. GLOBAL bool ConnSSL_InitLibrary PARAMS((void));
  40. #endif /* conf_ssl_h */
  41. /* -eof- */