annotate src/ssl-gnutls.c @ 6738:6c95f01aaf49

[gaim-migrate @ 7270] Added optional GNUTLS support, which will also be used as a fallback if Mozilla NSS is not installed. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 04 Sep 2003 06:19:25 +0000
parents
children 82348b5ab87e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6738
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file ssl-gnutls.c SSL Operations for GNUTLS
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 * @ingroup core
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 * gaim
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 *
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 *
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * (at your option) any later version.
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 *
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * GNU General Public License for more details.
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 *
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 */
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 #include "debug.h"
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 #include "sslconn.h"
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 #include <gnutls/gnutls.h>
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 typedef struct
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 {
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 gnutls_session session;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 gnutls_certificate_client_credentials xcred;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 } GaimSslGnutlsData;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 #define GAIM_SSL_GNUTLS_DATA(gsc) ((GaimSslGnutlsData *)gsc->private_data)
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 static gnutls_certificate_client_credentials xcred;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39 static gboolean
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 ssl_gnutls_init(void)
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41 {
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 gnutls_global_init();
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 gnutls_certificate_allocate_credentials(&xcred);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 gnutls_certificate_set_x509_trust_file(xcred, "ca.pem", GNUTLS_X509_FMT_PEM);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 return TRUE;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 }
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 static void
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 ssl_gnutls_uninit(void)
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 {
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 gnutls_global_deinit();
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 gnutls_certificate_free_credentials(xcred);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 }
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 static void
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59 ssl_gnutls_connect_cb(gpointer data, gint source, GaimInputCondition cond)
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60 {
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61 GaimSslConnection *gsc = (GaimSslConnection *)data;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62 GaimSslGnutlsData *gnutls_data;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 int ret;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 const int cert_type_priority[2] = { GNUTLS_CRT_X509, 0 };
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 gsc->fd = source;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 gnutls_data = g_new0(GaimSslGnutlsData, 1);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69 gsc->private_data = gnutls_data;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71 gnutls_init(&gnutls_data->session, GNUTLS_CLIENT);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 gnutls_set_default_priority(gnutls_data->session);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 gnutls_certificate_type_set_priority(gnutls_data->session,
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 cert_type_priority);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77 gnutls_credentials_set(gnutls_data->session, GNUTLS_CRD_CERTIFICATE,
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78 xcred);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 gnutls_transport_set_ptr(gnutls_data->session, GINT_TO_POINTER(source));
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
82 gaim_debug_info("gnutls", "Handshaking\n");
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 ret = gnutls_handshake(gnutls_data->session);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85 if (ret < 0)
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 {
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87 }
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 else
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89 {
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
90 gaim_debug_info("gnutls", "Calling input function\n");
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
91 gsc->input_func(gsc->user_data, (GaimSslConnection *)gsc, cond);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92 }
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93 }
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95 static void
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96 ssl_gnutls_close(GaimSslConnection *gsc)
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97 {
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
98 GaimSslGnutlsData *gnutls_data = GAIM_SSL_GNUTLS_DATA(gsc);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
100 gnutls_bye(gnutls_data->session, GNUTLS_SHUT_RDWR);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
101
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
102 gnutls_deinit(gnutls_data->session);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
103 // gnutls_certificate_free_credentials(gnutls_data->xcred);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
104
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
105 g_free(gnutls_data);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
106 }
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
107
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
108 static size_t
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109 ssl_gnutls_read(GaimSslConnection *gsc, void *data, size_t len)
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
110 {
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
111 GaimSslGnutlsData *gnutls_data = GAIM_SSL_GNUTLS_DATA(gsc);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
112 int s;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
113
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
114 s = gnutls_record_recv(gnutls_data->session, data, len);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
115
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116 if (s < 0)
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
117 s = 0;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
118
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119 gaim_debug_misc("gnutls", "s = %d\n", s);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
120
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
121 return s;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
122 }
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
124 static size_t
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
125 ssl_gnutls_write(GaimSslConnection *gsc, const void *data, size_t len)
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
126 {
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
127 GaimSslGnutlsData *gnutls_data = GAIM_SSL_GNUTLS_DATA(gsc);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
128 size_t s;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 gaim_debug_misc("gnutls", "Writing: {%s}\n", data);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132 s = gnutls_record_send(gnutls_data->session, data, len);
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 }
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 static GaimSslOps ssl_ops =
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136 {
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137 ssl_gnutls_init,
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
138 ssl_gnutls_uninit,
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139 ssl_gnutls_connect_cb,
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140 ssl_gnutls_close,
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141 ssl_gnutls_read,
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
142 ssl_gnutls_write
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
143 };
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
145 GaimSslOps *
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
146 gaim_ssl_gnutls_get_ops()
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
147 {
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
148 return &ssl_ops;
6c95f01aaf49 [gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
149 }