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