summaryrefslogtreecommitdiff
path: root/src/ne_privssl.h
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2004-10-04 21:20:31 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2004-10-04 21:20:31 +0000
commite44d925681dfb819b10eef3d32ef9b54636af1f1 (patch)
tree88e37dfb24fadeb261afd908ccffc1d663bce236 /src/ne_privssl.h
parentb32b6401fdbbb484d2ed5e6650125ad169b99fc2 (diff)
downloadneon-e44d925681dfb819b10eef3d32ef9b54636af1f1.tar.gz
Begin integration of GNU TLS support from Aleix Conchillo Flaque:
* macros/neon.m4 (NE_CHECK_OPENSSLVER): Renamed from NE_CHECK_SSLVER. (NEON_SSL): Add detection support for GNU TLS. Define HAVE_GNUTLS or HAVE_OPENSSL as appropriate. * src/ne_utils.c (version_string): Update to include GNU TLS version string. * src/ne_privssl.h (HAVE_GNUTLS): Add alternative private structure definitions. * src/ne_auth.c (get_cnonce): Adjust to use HAVE_OPENSSL rather than NE_HAVE_SSL. * src/ne_gnutls.c: New file. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@274 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_privssl.h')
-rw-r--r--src/ne_privssl.h36
1 files changed, 29 insertions, 7 deletions
diff --git a/src/ne_privssl.h b/src/ne_privssl.h
index ea3a840..2340c5f 100644
--- a/src/ne_privssl.h
+++ b/src/ne_privssl.h
@@ -1,6 +1,7 @@
/*
SSL interface definitions internal to neon.
- Copyright (C) 2003, Joe Orton <joe@manyfish.co.uk>
+ Copyright (C) 2003, 2004, Joe Orton <joe@manyfish.co.uk>
+ Copyright (C) 2004, Aleix Conchillo Flaque <aleix@member.fsf.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -25,15 +26,15 @@
#ifndef NE_PRIVSSL_H
#define NE_PRIVSSL_H
-/* This is the private interface between ne_socket and ne_openssl. */
+/* This is the private interface between ne_socket, ne_gnutls and
+ * ne_openssl. */
-#ifdef NE_HAVE_SSL
+#include "ne_ssl.h"
-#include <openssl/ssl.h>
+#ifdef HAVE_OPENSSL
-#include "ne_ssl.h"
+#include <openssl/ssl.h>
-/* SSL context */
struct ne_ssl_context_s {
SSL_CTX *ctx;
SSL_SESSION *sess;
@@ -43,6 +44,27 @@ struct ne_ssl_socket_s {
SSL *ssl;
};
-#endif /* NE_HAVE_SSL */
+#endif /* HAVE_OPENSSL */
+
+#ifdef HAVE_GNUTLS
+
+#include <gnutls/gnutls.h>
+
+struct ne_ssl_context_s {
+ gnutls_session sess;
+ gnutls_dh_params dh_params;
+ gnutls_rsa_params rsa_params;
+ /* Use union in case other credentials want to be added
+ * (anonymous, SRP) */
+ union {
+ gnutls_certificate_credentials cert;
+ } cred;
+};
+
+struct ne_ssl_socket_s {
+ gnutls_session sess;
+};
+
+#endif /* HAVE_GNUTLS */
#endif