added gnutls backend and moved backend code into new files
[ircu2.10.12-pk.git] / include / ssl.h
index dc910b1aaa587e5e7944b22ab5eef2e45c9bc7ac..03494cbc9231e9fcd8b54b0d563dbbed6962475f 100644 (file)
@@ -24,7 +24,7 @@ enum SSLDataType {
   SSLData_Client
 };
 
-#if defined(HAVE_GNUTLS_GNUTLS_H)
+#if defined(HAVE_GNUTLS)
 #include <gnutls/gnutls.h>
 
 struct SSLConnection {
@@ -39,7 +39,7 @@ struct SSLListener {
   gnutls_certificate_credentials_t credentials;
 };
 
-#elif defined(HAVE_OPENSSL_SSL_H)
+#elif defined(HAVE_OPENSSL)
 #include <openssl/rand.h>
 #include <openssl/ssl.h>
 #include <openssl/err.h>
@@ -94,4 +94,6 @@ IOResult ssl_send_encrypt(struct SSLConnection *connection, struct MsgQ* buf, un
 IOResult ssl_send_encrypt_plain(struct SSLConnection *connection, char *buf, int len);
 extern int ssl_connection_flush(struct SSLConnection *connection);
 
+extern const char* ssl_get_cipher(struct SSLConnection *connection);
+
 #endif /* INCLUDED_parse_h */