Mercurial > pidgin
annotate src/sslconn.c @ 14160:c8ebbc0110f4
[gaim-migrate @ 16808]
gaim_ssl_connect's are now cancelable (without crashing, anyway)
This was relatively easy, because the PRPLs already keep a reference
to the GaimSslConnection. I just needed to update the core ssl code
to keep track of the GaimProxyConnectInfo, and to call
gaim_proxy_connect_cancel() when gaim_ssl_close() is called
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Thu, 17 Aug 2006 05:47:10 +0000 |
| parents | 7a205b430d19 |
| children | fcae2cfe26eb |
| rev | line source |
|---|---|
| 6703 | 1 /** |
| 2 * @file sslconn.c SSL API | |
| 3 * @ingroup core | |
| 4 * | |
| 5 * gaim | |
| 6 * | |
| 8046 | 7 * Gaim is the legal property of its developers, whose names are too numerous |
| 8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 9 * source distribution. | |
| 6703 | 10 * |
| 11 * This program is free software; you can redistribute it and/or modify | |
| 12 * it under the terms of the GNU General Public License as published by | |
| 13 * the Free Software Foundation; either version 2 of the License, or | |
| 14 * (at your option) any later version. | |
| 15 * | |
| 16 * This program is distributed in the hope that it will be useful, | |
| 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 19 * GNU General Public License for more details. | |
| 20 * | |
| 21 * You should have received a copy of the GNU General Public License | |
| 22 * along with this program; if not, write to the Free Software | |
| 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 24 */ | |
| 25 #include "internal.h" | |
| 26 | |
| 27 #include "debug.h" | |
| 28 #include "sslconn.h" | |
| 29 | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
30 static gboolean _ssl_initialized = FALSE; |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
31 static GaimSslOps *_ssl_ops = NULL; |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
32 |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
33 static gboolean |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
34 ssl_init(void) |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
35 { |
|
7018
cd8a9907c779
[gaim-migrate @ 7581]
Christian Hammond <chipx86@chipx86.com>
parents:
7016
diff
changeset
|
36 GaimPlugin *plugin; |
| 7863 | 37 GaimSslOps *ops; |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
38 |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
39 if (_ssl_initialized) |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
40 return FALSE; |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
41 |
|
7024
001d11a7e345
[gaim-migrate @ 7587]
Christian Hammond <chipx86@chipx86.com>
parents:
7018
diff
changeset
|
42 plugin = gaim_plugins_find_with_id("core-ssl"); |
|
7018
cd8a9907c779
[gaim-migrate @ 7581]
Christian Hammond <chipx86@chipx86.com>
parents:
7016
diff
changeset
|
43 |
|
cd8a9907c779
[gaim-migrate @ 7581]
Christian Hammond <chipx86@chipx86.com>
parents:
7016
diff
changeset
|
44 if (plugin != NULL && !gaim_plugin_is_loaded(plugin)) |
|
cd8a9907c779
[gaim-migrate @ 7581]
Christian Hammond <chipx86@chipx86.com>
parents:
7016
diff
changeset
|
45 gaim_plugin_load(plugin); |
|
cd8a9907c779
[gaim-migrate @ 7581]
Christian Hammond <chipx86@chipx86.com>
parents:
7016
diff
changeset
|
46 |
| 7863 | 47 ops = gaim_ssl_get_ops(); |
| 14160 | 48 if ((ops == NULL) || (ops->init == NULL) || (ops->uninit == NULL) || |
| 49 (ops->connect == NULL) || (ops->close == NULL) || | |
| 50 (ops->read == NULL) || (ops->write == NULL)) | |
| 51 { | |
| 7863 | 52 return FALSE; |
| 14160 | 53 } |
| 54 | |
| 55 return ops->init(); | |
| 6703 | 56 } |
| 57 | |
| 58 gboolean | |
| 59 gaim_ssl_is_supported(void) | |
| 60 { | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
61 #ifdef HAVE_SSL |
| 7355 | 62 ssl_init(); |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
63 return (gaim_ssl_get_ops() != NULL); |
| 6703 | 64 #else |
| 65 return FALSE; | |
| 66 #endif | |
| 67 } | |
| 68 | |
| 14160 | 69 static void |
| 70 gaim_ssl_connect_cb(gpointer data, gint source, const gchar *error_message) | |
| 71 { | |
| 72 GaimSslConnection *gsc; | |
| 73 GaimSslOps *ops; | |
| 74 | |
| 75 gsc = data; | |
| 76 gsc->connect_info = NULL; | |
| 77 | |
| 78 if (source < 0) | |
| 79 { | |
| 80 if (gsc->error_cb != NULL) | |
| 81 gsc->error_cb(gsc, GAIM_SSL_CONNECT_FAILED, gsc->connect_cb_data); | |
| 82 | |
| 83 gaim_ssl_close(gsc); | |
| 84 return; | |
| 85 } | |
| 86 | |
| 87 gsc->fd = source; | |
| 88 | |
| 89 ops = gaim_ssl_get_ops(); | |
| 90 ops->connect(gsc); | |
| 91 } | |
| 92 | |
| 6703 | 93 GaimSslConnection * |
| 94 gaim_ssl_connect(GaimAccount *account, const char *host, int port, | |
|
7274
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
95 GaimSslInputFunction func, GaimSslErrorFunction error_func, |
|
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
96 void *data) |
| 6703 | 97 { |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
98 GaimSslConnection *gsc; |
| 6703 | 99 |
| 100 g_return_val_if_fail(host != NULL, NULL); | |
| 101 g_return_val_if_fail(port != 0 && port != -1, NULL); | |
| 102 g_return_val_if_fail(func != NULL, NULL); | |
| 103 g_return_val_if_fail(gaim_ssl_is_supported(), NULL); | |
| 104 | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
105 if (!_ssl_initialized) |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
106 { |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
107 if (!ssl_init()) |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
108 return NULL; |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
109 } |
| 6703 | 110 |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
111 gsc = g_new0(GaimSslConnection, 1); |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
112 |
| 14160 | 113 gsc->fd = -1; |
|
7274
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
114 gsc->host = g_strdup(host); |
|
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
115 gsc->port = port; |
|
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
116 gsc->connect_cb_data = data; |
|
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
117 gsc->connect_cb = func; |
|
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
118 gsc->error_cb = error_func; |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
119 |
| 14160 | 120 gsc->connect_info = gaim_proxy_connect(account, host, port, gaim_ssl_connect_cb, gsc); |
| 6703 | 121 |
| 14160 | 122 if (gsc->connect_info == NULL) |
| 6703 | 123 { |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
124 g_free(gsc->host); |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
125 g_free(gsc); |
| 6703 | 126 |
| 127 return NULL; | |
| 128 } | |
| 129 | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
130 return (GaimSslConnection *)gsc; |
| 6703 | 131 } |
| 132 | |
| 6764 | 133 static void |
| 134 recv_cb(gpointer data, gint source, GaimInputCondition cond) | |
| 135 { | |
| 136 GaimSslConnection *gsc = data; | |
| 137 | |
| 138 gsc->recv_cb(gsc->recv_cb_data, gsc, cond); | |
| 139 } | |
| 140 | |
| 141 void | |
|
7274
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
142 gaim_ssl_input_add(GaimSslConnection *gsc, GaimSslInputFunction func, |
|
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
143 void *data) |
| 6764 | 144 { |
| 145 g_return_if_fail(func != NULL); | |
| 146 g_return_if_fail(gaim_ssl_is_supported()); | |
| 147 | |
| 148 gsc->recv_cb_data = data; | |
|
7274
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
149 gsc->recv_cb = func; |
|
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
150 |
| 6764 | 151 gsc->inpa = gaim_input_add(gsc->fd, GAIM_INPUT_READ, recv_cb, gsc); |
| 152 } | |
| 153 | |
|
6762
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
154 GaimSslConnection * |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
155 gaim_ssl_connect_fd(GaimAccount *account, int fd, |
|
7274
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
156 GaimSslInputFunction func, |
|
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
157 GaimSslErrorFunction error_func, void *data) |
|
6762
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
158 { |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
159 GaimSslConnection *gsc; |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
160 GaimSslOps *ops; |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
161 |
| 13986 | 162 g_return_val_if_fail(fd != -1, NULL); |
|
6762
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
163 g_return_val_if_fail(func != NULL, NULL); |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
164 g_return_val_if_fail(gaim_ssl_is_supported(), NULL); |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
165 |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
166 if (!_ssl_initialized) |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
167 { |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
168 if (!ssl_init()) |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
169 return NULL; |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
170 } |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
171 |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
172 gsc = g_new0(GaimSslConnection, 1); |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
173 |
|
7274
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
174 gsc->connect_cb_data = data; |
|
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
175 gsc->connect_cb = func; |
|
448e39ace278
[gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents:
7024
diff
changeset
|
176 gsc->error_cb = error_func; |
| 14160 | 177 gsc->fd = fd; |
|
6762
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
178 |
| 14160 | 179 ops = gaim_ssl_get_ops(); |
| 180 ops->connect(gsc); | |
|
6762
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
181 |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
182 return (GaimSslConnection *)gsc; |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
183 } |
|
818ce550d2ce
[gaim-migrate @ 7294]
Christian Hammond <chipx86@chipx86.com>
parents:
6745
diff
changeset
|
184 |
| 6703 | 185 void |
| 186 gaim_ssl_close(GaimSslConnection *gsc) | |
| 187 { | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
188 GaimSslOps *ops; |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
189 |
| 6703 | 190 g_return_if_fail(gsc != NULL); |
| 191 | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
192 ops = gaim_ssl_get_ops(); |
| 14160 | 193 (ops->close)(gsc); |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
194 |
| 14160 | 195 if (gsc->connect_info != NULL) |
| 196 gaim_proxy_connect_cancel(gsc->connect_info); | |
| 197 | |
| 198 if (gsc->inpa > 0) | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
199 gaim_input_remove(gsc->inpa); |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
200 |
| 14160 | 201 if (gsc->fd >= 0) |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
202 close(gsc->fd); |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
203 |
| 13986 | 204 g_free(gsc->host); |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
205 g_free(gsc); |
| 6703 | 206 } |
| 207 | |
| 208 size_t | |
| 209 gaim_ssl_read(GaimSslConnection *gsc, void *data, size_t len) | |
| 210 { | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
211 GaimSslOps *ops; |
| 6703 | 212 |
| 213 g_return_val_if_fail(gsc != NULL, 0); | |
| 214 g_return_val_if_fail(data != NULL, 0); | |
| 215 g_return_val_if_fail(len > 0, 0); | |
| 216 | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
217 ops = gaim_ssl_get_ops(); |
| 14160 | 218 return (ops->read)(gsc, data, len); |
| 6703 | 219 } |
| 220 | |
| 221 size_t | |
| 222 gaim_ssl_write(GaimSslConnection *gsc, const void *data, size_t len) | |
| 223 { | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
224 GaimSslOps *ops; |
| 6703 | 225 |
| 226 g_return_val_if_fail(gsc != NULL, 0); | |
| 227 g_return_val_if_fail(data != NULL, 0); | |
| 228 g_return_val_if_fail(len > 0, 0); | |
| 229 | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
230 ops = gaim_ssl_get_ops(); |
| 14160 | 231 return (ops->write)(gsc, data, len); |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
232 } |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
233 |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
234 void |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
235 gaim_ssl_set_ops(GaimSslOps *ops) |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
236 { |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
237 _ssl_ops = ops; |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
238 } |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
239 |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
240 GaimSslOps * |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
241 gaim_ssl_get_ops(void) |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
242 { |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
243 return _ssl_ops; |
| 6703 | 244 } |
| 245 | |
| 246 void | |
| 247 gaim_ssl_init(void) | |
| 248 { | |
| 249 } | |
| 250 | |
| 251 void | |
| 252 gaim_ssl_uninit(void) | |
| 253 { | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
254 GaimSslOps *ops; |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
255 |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
256 if (!_ssl_initialized) |
| 6703 | 257 return; |
| 258 | |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
259 ops = gaim_ssl_get_ops(); |
| 14160 | 260 ops->uninit(); |
|
6738
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
261 |
|
6c95f01aaf49
[gaim-migrate @ 7270]
Christian Hammond <chipx86@chipx86.com>
parents:
6735
diff
changeset
|
262 _ssl_initialized = FALSE; |
| 6703 | 263 } |
