[BACK]Return to conf-ssl.h CVS log [TXT][DIR] Up to [local] / ircnowd / src / ngircd

Annotation of ircnowd/src/ngircd/conf-ssl.h, Revision 1.1.1.1

1.1       tomglok     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: #if OPENSSL_VERSION_NUMBER < 0x10100000L
                     17: #define OpenSSL_version SSLeay_version
                     18: #define OPENSSL_VERSION SSLEAY_VERSION
                     19: #endif
                     20: #endif
                     21: #ifdef HAVE_LIBGNUTLS
                     22: #define SSL_SUPPORT
                     23: #include <gnutls/gnutls.h>
                     24: #ifndef LIBGNUTLS_VERSION_MAJOR
                     25: #define gnutls_certificate_credentials_t gnutls_certificate_credentials
                     26: #define gnutls_cipher_algorithm_t gnutls_cipher_algorithm
                     27: #define gnutls_datum_t gnutls_datum
                     28: #define gnutls_dh_params_t gnutls_dh_params
                     29: #define gnutls_session_t gnutls_session
                     30: #define gnutls_transport_ptr_t gnutls_transport_ptr
                     31: #endif
                     32: #endif
                     33:
                     34: #ifdef SSL_SUPPORT
                     35: struct ConnSSL_State {
                     36: #ifdef HAVE_LIBSSL
                     37:        SSL *ssl;
                     38: #endif
                     39: #ifdef HAVE_LIBGNUTLS
                     40:        gnutls_session_t gnutls_session;
                     41:        void *cookie;           /* pointer to server configuration structure
                     42:                                   (for outgoing connections), or NULL. */
                     43:        size_t x509_cred_idx;   /* index of active x509 credential record */
                     44: #endif
                     45:        char *fingerprint;
                     46: };
                     47:
                     48: #endif
                     49:
                     50: GLOBAL bool ConnSSL_InitLibrary PARAMS((void));
                     51:
                     52: #endif /* conf_ssl_h */
                     53:
                     54: /* -eof- */

CVSweb