2008-09-13 15:06:35 +02:00
|
|
|
/*
|
|
|
|
* ngIRCd -- The Next Generation IRC Daemon
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef conf_ssl_h
|
|
|
|
#define conf_ssl_h
|
|
|
|
|
2010-12-27 17:14:14 +01:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* SSL related definitions
|
|
|
|
*/
|
|
|
|
|
2008-09-13 15:06:35 +02:00
|
|
|
#ifdef HAVE_LIBSSL
|
|
|
|
#define SSL_SUPPORT
|
|
|
|
#include <openssl/ssl.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_LIBGNUTLS
|
|
|
|
#define SSL_SUPPORT
|
|
|
|
#include <gnutls/gnutls.h>
|
2008-11-11 22:03:11 +01:00
|
|
|
#ifndef LIBGNUTLS_VERSION_MAJOR
|
|
|
|
#define gnutls_certificate_credentials_t gnutls_certificate_credentials
|
|
|
|
#define gnutls_cipher_algorithm_t gnutls_cipher_algorithm
|
|
|
|
#define gnutls_datum_t gnutls_datum
|
|
|
|
#define gnutls_dh_params_t gnutls_dh_params
|
|
|
|
#define gnutls_session_t gnutls_session
|
|
|
|
#define gnutls_transport_ptr_t gnutls_transport_ptr
|
|
|
|
#endif
|
2008-09-13 15:06:35 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef SSL_SUPPORT
|
|
|
|
struct ConnSSL_State {
|
|
|
|
#ifdef HAVE_LIBSSL
|
|
|
|
SSL *ssl;
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_LIBGNUTLS
|
2012-11-11 10:49:06 +01:00
|
|
|
gnutls_session_t gnutls_session;
|
2008-11-11 22:03:11 +01:00
|
|
|
void *cookie; /* pointer to server configuration structure
|
|
|
|
(for outgoing connections), or NULL. */
|
2008-09-13 15:06:35 +02:00
|
|
|
#endif
|
2013-08-02 02:47:06 +02:00
|
|
|
char *fingerprint;
|
2008-09-13 15:06:35 +02:00
|
|
|
};
|
|
|
|
|
2012-09-19 01:34:29 +02:00
|
|
|
#endif
|
|
|
|
|
2013-11-09 23:42:56 +01:00
|
|
|
GLOBAL bool ConnSSL_InitLibrary PARAMS((void));
|
2008-11-11 22:03:11 +01:00
|
|
|
|
2008-09-13 15:06:35 +02:00
|
|
|
#endif /* conf_ssl_h */
|
2008-11-11 22:03:11 +01:00
|
|
|
|
2008-09-13 15:06:35 +02:00
|
|
|
/* -eof- */
|