diff src/ssl-nss.c @ 6764:6d0d4e9149b9

[gaim-migrate @ 7296] well, jabber.org is being a pain in the moment, as is my server. but this seems to work, so here it is. Jabber SSL support. Make sure you set the port to 5223 and check the "Use SSL" checkbox in the account editor. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 06 Sep 2003 16:04:41 +0000
parents f9efcba2d02f
children efef00de3f09
line wrap: on
line diff
--- a/src/ssl-nss.c	Sat Sep 06 15:15:24 2003 +0000
+++ b/src/ssl-nss.c	Sat Sep 06 16:04:41 2003 +0000
@@ -117,33 +117,6 @@
 	return status;
 }
 
-static void
-input_func(gpointer data, gint source, GaimInputCondition cond)
-{
-	GaimSslConnection *gsc = (GaimSslConnection *)data;
-#if 0
-	GaimSslNssData *nss_data = GAIM_SSL_NSS_DATA(gsc);
-	char *cp, *ip, *sp;
-	int op, kp0, kp1;
-	int result;
-
-	result = SSL_SecurityStatus(nss_data->in, &op, &cp, &kp0,
-								&kp1, &ip, &sp);
-
-	gaim_debug_misc("nss",
-		"bulk cipher %s, %d secret key bits, %d key bits, status: %d\n"
-		"subject DN: %s\n"
-		"issuer  DN: %s\n",
-		cp, kp1, kp0, op, sp, ip);
-
-	PR_Free(cp);
-	PR_Free(ip);
-	PR_Free(sp);
-#endif
-
-	gsc->input_func(gsc->user_data, gsc, cond);
-}
-
 static gboolean
 ssl_nss_init(void)
 {
@@ -227,9 +200,14 @@
 		return;
 	}
 
-	gsc->inpa = gaim_input_add(gsc->fd,
-							   GAIM_INPUT_READ | GAIM_INPUT_WRITE,
-							   input_func, gsc);
+	gsc->connect_cb(gsc->connect_cb_data, gsc, cond);
+}
+
+static void
+ssl_nss_recv_cb(gpointer data, gint source, GaimInputCondition cond)
+{
+	GaimSslConnection *gsc = data;
+	gsc->recv_cb(gsc->recv_cb_data, gsc, cond);
 }
 
 static void
@@ -264,6 +242,7 @@
 	ssl_nss_init,
 	ssl_nss_uninit,
 	ssl_nss_connect_cb,
+	ssl_nss_recv_cb,
 	ssl_nss_close,
 	ssl_nss_read,
 	ssl_nss_write