1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
$NetBSD: patch-al,v 1.8 2006/07/07 00:24:43 minskim Exp $
http://bugzilla.gnome.org/show_bug.cgi?id=337993
--- imported/neon/ne_privssl.h.orig 2006-06-26 16:32:19.000000000 -0700
+++ imported/neon/ne_privssl.h
@@ -0,0 +1,63 @@
+/*
+ SSL interface definitions internal to neon.
+ 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
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA
+
+*/
+
+/* THIS IS NOT A PUBLIC INTERFACE. You CANNOT include this header file
+ * from an application. */
+
+#ifndef NE_PRIVSSL_H
+#define NE_PRIVSSL_H
+
+/* This is the private interface between ne_socket, ne_gnutls and
+ * ne_openssl. */
+
+#include "ne_ssl.h"
+#include "ne_socket.h"
+
+#ifdef HAVE_OPENSSL
+
+#include <openssl/ssl.h>
+
+struct ne_ssl_context_s {
+ SSL_CTX *ctx;
+ SSL_SESSION *sess;
+};
+
+typedef SSL *ne_ssl_socket;
+
+#endif /* HAVE_OPENSSL */
+
+#ifdef HAVE_GNUTLS
+
+#include <gnutls/gnutls.h>
+
+struct ne_ssl_context_s {
+ gnutls_certificate_credentials cred;
+ /* TODO: store session here too */
+};
+
+typedef gnutls_session ne_ssl_socket;
+
+#endif /* HAVE_GNUTLS */
+
+ne_ssl_socket ne__sock_sslsock(ne_socket *sock);
+
+#endif /* NE_PRIVSSL_H */
|