]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conf-ssl.h
ngIRCd Release 27
[ngircd-alex.git] / src / ngircd / conf-ssl.h
index 35ba28f4f667235189f863e11dccebb321dba755..a8896a1f634db1fd511a9129442e2d50b3b05420 100644 (file)
@@ -1,18 +1,34 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * SSL defines.
  */
 
 #ifndef conf_ssl_h
 #define conf_ssl_h
 
+/**
+ * @file
+ * SSL related definitions
+ */
+
 #ifdef HAVE_LIBSSL
 #define SSL_SUPPORT
 #include <openssl/ssl.h>
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#define OpenSSL_version SSLeay_version
+#define OPENSSL_VERSION SSLEAY_VERSION
+#endif
 #endif
 #ifdef HAVE_LIBGNUTLS
 #define SSL_SUPPORT
 #include <gnutls/gnutls.h>
+#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
 #endif
 
 #ifdef SSL_SUPPORT
@@ -22,16 +38,17 @@ struct ConnSSL_State {
 #endif
 #ifdef HAVE_LIBGNUTLS
        gnutls_session_t gnutls_session;
-       void *cookie;   /* pointer to server configuration structure (for outgoing connections), or NULL. */
+       void *cookie;           /* pointer to server configuration structure
+                                  (for outgoing connections), or NULL. */
+       size_t x509_cred_idx;   /* index of active x509 credential record */
 #endif
+       char *fingerprint;
 };
 
+#endif
+
+GLOBAL bool ConnSSL_InitLibrary PARAMS((void));
 
-bool
-ConnSSL_InitLibrary(void);
-#else
-static inline bool
-ConnSSL_InitLibrary(void) { return true; }
-#endif /* SSL_SUPPORT */
 #endif /* conf_ssl_h */
+
 /* -eof- */