]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/conf-ssl.h
TLS/SSL support: core files.
[ngircd-alex.git] / src / ngircd / conf-ssl.h
1 /*
2  * ngIRCd -- The Next Generation IRC Daemon
3  * SSL defines.
4  */
5
6 #ifndef conf_ssl_h
7 #define conf_ssl_h
8
9 #ifdef HAVE_LIBSSL
10 #define SSL_SUPPORT
11 #include <openssl/ssl.h>
12 #endif
13 #ifdef HAVE_LIBGNUTLS
14 #define SSL_SUPPORT
15 #include <gnutls/gnutls.h>
16 #endif
17
18 #ifdef SSL_SUPPORT
19 struct ConnSSL_State {
20 #ifdef HAVE_LIBSSL
21         SSL *ssl;
22 #endif
23 #ifdef HAVE_LIBGNUTLS
24         gnutls_session_t gnutls_session;
25         void *cookie;   /* pointer to server configuration structure (for outgoing connections), or NULL. */
26 #endif
27 };
28
29
30 bool
31 ConnSSL_InitLibrary(void);
32 #else
33 static inline bool
34 ConnSSL_InitLibrary(void) { return true; }
35 #endif /* SSL_SUPPORT */
36 #endif /* conf_ssl_h */
37 /* -eof- */