annotate plugins/ssl/ssl-nss.c @ 7808:4707d8436806

[gaim-migrate @ 8455] Yeah. Thanks to David Atallah for the disconnect dialog patch. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 08 Dec 2003 06:47:58 +0000
parents f9ed27be344e
children 01e6e9c46a01
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7016
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file ssl-nss.c Mozilla NSS SSL plugin.
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 *
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 * gaim
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 *
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 *
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * (at your option) any later version.
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 *
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * GNU General Public License for more details.
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 *
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 #include "internal.h"
7051
e885d4963a68 [gaim-migrate @ 7614]
Christian Hammond <chipx86@chipx86.com>
parents: 7050
diff changeset
23 #include "debug.h"
7016
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 #include "plugin.h"
7051
e885d4963a68 [gaim-migrate @ 7614]
Christian Hammond <chipx86@chipx86.com>
parents: 7050
diff changeset
25 #include "sslconn.h"
7016
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26
7029
b80c7a4dfae7 [gaim-migrate @ 7592]
Christian Hammond <chipx86@chipx86.com>
parents: 7028
diff changeset
27 #define SSL_NSS_PLUGIN_ID "ssl-nss"
7016
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 #ifdef HAVE_NSS
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 #include <nspr.h>
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 #include <private/pprio.h>
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 #include <nss.h>
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 #include <pk11func.h>
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 #include <prio.h>
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 #include <secerr.h>
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 #include <secmod.h>
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38 #include <ssl.h>
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39 #include <sslerr.h>
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 #include <sslproto.h>
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 typedef struct
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 PRFileDesc *fd;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 PRFileDesc *in;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 } GaimSslNssData;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 #define GAIM_SSL_NSS_DATA(gsc) ((GaimSslNssData *)gsc->private_data)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 static const PRIOMethods *_nss_methods = NULL;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 static PRDescIdentity _identity;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54 static SECStatus
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 ssl_auth_cert(void *arg, PRFileDesc *socket, PRBool checksig,
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 PRBool is_server)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 return SECSuccess;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60 #if 0
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61 CERTCertificate *cert;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62 void *pinArg;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63 SECStatus status;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 cert = SSL_PeerCertificate(socket);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 pinArg = SSL_RevealPinArg(socket);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 status = CERT_VerifyCertNow((CERTCertDBHandle *)arg, cert, checksig,
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69 certUsageSSLClient, pinArg);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71 if (status != SECSuccess) {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
72 gaim_debug_error("nss", "CERT_VerifyCertNow failed\n");
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73 CERT_DestroyCertificate(cert);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 return status;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77 CERT_DestroyCertificate(cert);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78 return SECSuccess;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 #endif
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
82 static SECStatus
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 ssl_bad_cert(void *arg, PRFileDesc *socket)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85 SECStatus status = SECFailure;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 PRErrorCode err;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 if (arg == NULL)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
89 return status;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
90
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
91 *(PRErrorCode *)arg = err = PORT_GetError();
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
92
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93 switch (err)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95 case SEC_ERROR_INVALID_AVA:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96 case SEC_ERROR_INVALID_TIME:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97 case SEC_ERROR_BAD_SIGNATURE:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
98 case SEC_ERROR_EXPIRED_CERTIFICATE:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99 case SEC_ERROR_UNKNOWN_ISSUER:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
100 case SEC_ERROR_UNTRUSTED_CERT:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
101 case SEC_ERROR_CERT_VALID:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
102 case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
103 case SEC_ERROR_CRL_EXPIRED:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
104 case SEC_ERROR_CRL_BAD_SIGNATURE:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
105 case SEC_ERROR_EXTENSION_VALUE_INVALID:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
106 case SEC_ERROR_CA_CERT_INVALID:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
107 case SEC_ERROR_CERT_USAGES_INVALID:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
108 case SEC_ERROR_UNKNOWN_CRITICAL_EXTENSION:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109 status = SECSuccess;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
110 break;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
111
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
112 default:
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
113 status = SECFailure;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
114 break;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
115 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
117 gaim_debug_error("nss", "Bad certificate: %d\n");
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
118
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119 return status;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
120 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
121
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
122 static gboolean
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123 ssl_nss_init(void)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
124 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
125 PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
126 NSS_NoDB_Init(NULL);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
127
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
128 /* TODO: Fix this so autoconf does the work trying to find this lib. */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129 SECMOD_AddNewModule("Builtins",
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 #ifndef _WIN32
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131 LIBDIR "/libnssckbi.so",
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132 #else
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 "nssckbi.dll",
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134 #endif
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 0, 0);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136 NSS_SetDomesticPolicy();
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
138 _identity = PR_GetUniqueIdentity("Gaim");
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139 _nss_methods = PR_GetDefaultIOMethods();
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141 return TRUE;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
142 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
143
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
144 static void
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
145 ssl_nss_uninit(void)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
146 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
147 PR_Cleanup();
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
148
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
149 _nss_methods = NULL;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
150 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
151
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
152 static void
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
153 ssl_nss_connect_cb(gpointer data, gint source, GaimInputCondition cond)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
154 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
155 GaimSslConnection *gsc = (GaimSslConnection *)data;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
156 GaimSslNssData *nss_data = g_new0(GaimSslNssData, 1);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
157 PRSocketOptionData socket_opt;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
158
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
159 gsc->private_data = nss_data;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
160
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
161 gsc->fd = source;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
162
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
163 nss_data->fd = PR_ImportTCPSocket(gsc->fd);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
164
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
165 if (nss_data->fd == NULL)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
166 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
167 gaim_debug_error("nss", "nss_data->fd == NULL!\n");
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
168
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
169 gaim_ssl_close((GaimSslConnection *)gsc);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
170
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
171 return;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
172 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
173
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
174 socket_opt.option = PR_SockOpt_Nonblocking;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
175 socket_opt.value.non_blocking = PR_FALSE;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
176
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
177 PR_SetSocketOption(nss_data->fd, &socket_opt);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
178
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
179 nss_data->in = SSL_ImportFD(NULL, nss_data->fd);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
180
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
181 if (nss_data->in == NULL)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
182 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
183 gaim_debug_error("nss", "nss_data->in == NUL!\n");
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
184
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
185 gaim_ssl_close((GaimSslConnection *)gsc);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
186
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
187 return;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
188 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
189
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
190 SSL_OptionSet(nss_data->in, SSL_SECURITY, PR_TRUE);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
191 SSL_OptionSet(nss_data->in, SSL_HANDSHAKE_AS_CLIENT, PR_TRUE);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
192
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
193 SSL_AuthCertificateHook(nss_data->in,
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
194 (SSLAuthCertificate)ssl_auth_cert,
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
195 (void *)CERT_GetDefaultCertDB());
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
196 SSL_BadCertHook(nss_data->in, (SSLBadCertHandler)ssl_bad_cert, NULL);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
197
7157
fae7cfe975fd [gaim-migrate @ 7724]
Nathan Walp <nwalp@pidgin.im>
parents: 7053
diff changeset
198 if(gsc->host)
fae7cfe975fd [gaim-migrate @ 7724]
Nathan Walp <nwalp@pidgin.im>
parents: 7053
diff changeset
199 SSL_SetURL(nss_data->in, gsc->host);
7016
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
200
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
201 SSL_ResetHandshake(nss_data->in, PR_FALSE);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
202
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
203 if (SSL_ForceHandshake(nss_data->in))
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
204 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
205 gaim_debug_error("nss", "Handshake failed\n");
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
206
7274
448e39ace278 [gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents: 7157
diff changeset
207 if (gsc->error_cb != NULL)
448e39ace278 [gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents: 7157
diff changeset
208 gsc->error_cb(gsc, GAIM_SSL_HANDSHAKE_FAILED, data);
448e39ace278 [gaim-migrate @ 7851]
Christian Hammond <chipx86@chipx86.com>
parents: 7157
diff changeset
209
7016
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
210 gaim_ssl_close(gsc);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
211
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
212 return;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
213 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
214
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
215 gsc->connect_cb(gsc->connect_cb_data, gsc, cond);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
216 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
217
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
218 static void
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
219 ssl_nss_close(GaimSslConnection *gsc)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
220 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
221 GaimSslNssData *nss_data = GAIM_SSL_NSS_DATA(gsc);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
222
7467
f9ed27be344e [gaim-migrate @ 8080]
Nathan Walp <nwalp@pidgin.im>
parents: 7274
diff changeset
223 if(!nss_data)
f9ed27be344e [gaim-migrate @ 8080]
Nathan Walp <nwalp@pidgin.im>
parents: 7274
diff changeset
224 return;
f9ed27be344e [gaim-migrate @ 8080]
Nathan Walp <nwalp@pidgin.im>
parents: 7274
diff changeset
225
7016
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
226 if (nss_data->in) PR_Close(nss_data->in);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
227 /* if (nss_data->fd) PR_Close(nss_data->fd); */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
228
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
229 g_free(nss_data);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
230 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
231
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
232 static size_t
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
233 ssl_nss_read(GaimSslConnection *gsc, void *data, size_t len)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
234 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
235 GaimSslNssData *nss_data = GAIM_SSL_NSS_DATA(gsc);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
236
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
237 return PR_Read(nss_data->in, data, len);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
238 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
239
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
240 static size_t
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
241 ssl_nss_write(GaimSslConnection *gsc, const void *data, size_t len)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
242 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
243 GaimSslNssData *nss_data = GAIM_SSL_NSS_DATA(gsc);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
244
7467
f9ed27be344e [gaim-migrate @ 8080]
Nathan Walp <nwalp@pidgin.im>
parents: 7274
diff changeset
245 if(!nss_data)
f9ed27be344e [gaim-migrate @ 8080]
Nathan Walp <nwalp@pidgin.im>
parents: 7274
diff changeset
246 return 0;
f9ed27be344e [gaim-migrate @ 8080]
Nathan Walp <nwalp@pidgin.im>
parents: 7274
diff changeset
247
7016
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
248 return PR_Write(nss_data->in, data, len);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
249 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
250
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
251 static GaimSslOps ssl_ops =
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
252 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
253 ssl_nss_init,
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
254 ssl_nss_uninit,
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
255 ssl_nss_connect_cb,
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
256 ssl_nss_close,
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
257 ssl_nss_read,
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
258 ssl_nss_write
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
259 };
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
260
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
261 #endif /* HAVE_NSS */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
262
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
263
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
264 static gboolean
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
265 plugin_load(GaimPlugin *plugin)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
266 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
267 #ifdef HAVE_NSS
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
268 gaim_ssl_set_ops(&ssl_ops);
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
269
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
270 return TRUE;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
271 #else
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
272 return FALSE;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
273 #endif
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
274 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
275
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
276 static gboolean
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
277 plugin_unload(GaimPlugin *plugin)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
278 {
7053
9d8e56c66854 [gaim-migrate @ 7616]
Nathan Walp <nwalp@pidgin.im>
parents: 7051
diff changeset
279 #ifdef HAVE_NSS
7050
e8cd8827fb25 [gaim-migrate @ 7613]
Christian Hammond <chipx86@chipx86.com>
parents: 7029
diff changeset
280 gaim_ssl_set_ops(NULL);
e8cd8827fb25 [gaim-migrate @ 7613]
Christian Hammond <chipx86@chipx86.com>
parents: 7029
diff changeset
281 #endif
e8cd8827fb25 [gaim-migrate @ 7613]
Christian Hammond <chipx86@chipx86.com>
parents: 7029
diff changeset
282
7016
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
283 return TRUE;
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
284 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
285
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
286 static GaimPluginInfo info =
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
287 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
288 2, /**< api_version */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
289 GAIM_PLUGIN_STANDARD, /**< type */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
290 NULL, /**< ui_requirement */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
291 GAIM_PLUGIN_FLAG_INVISIBLE, /**< flags */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
292 NULL, /**< dependencies */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
293 GAIM_PRIORITY_DEFAULT, /**< priority */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
294
7029
b80c7a4dfae7 [gaim-migrate @ 7592]
Christian Hammond <chipx86@chipx86.com>
parents: 7028
diff changeset
295 SSL_NSS_PLUGIN_ID, /**< id */
7016
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
296 N_("NSS"), /**< name */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
297 VERSION, /**< version */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
298 /** summary */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
299 N_("Provides SSL support through Mozilla NSS."),
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
300 /** description */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
301 N_("Provides SSL support through Mozilla NSS."),
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
302 "Christian Hammond <chipx86@gnupdate.org>",
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
303 GAIM_WEBSITE, /**< homepage */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
304
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
305 plugin_load, /**< load */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
306 plugin_unload, /**< unload */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
307 NULL, /**< destroy */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
308
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
309 NULL, /**< ui_info */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
310 NULL /**< extra_info */
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
311 };
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
312
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
313 static void
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
314 init_plugin(GaimPlugin *plugin)
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
315 {
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
316 }
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
317
aa619031193b [gaim-migrate @ 7579]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
318 GAIM_INIT_PLUGIN(ssl_nss, init_plugin, info)