diff src/protocols/jabber/auth.c @ 7157:fae7cfe975fd

[gaim-migrate @ 7724] fix the NSS SSL plugin for TLS upgrades, and make note when a jabber server requires TLS upgrading. How many more acronyms can I fit in this commit message? committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 05 Oct 2003 05:35:44 +0000
parents e9867cdeb0fd
children e78c6f6e759c
line wrap: on
line diff
--- a/src/protocols/jabber/auth.c	Sun Oct 05 05:04:55 2003 +0000
+++ b/src/protocols/jabber/auth.c	Sun Oct 05 05:35:44 2003 +0000
@@ -41,11 +41,15 @@
 
 	gboolean digest_md5 = FALSE;
 
-	if(gaim_ssl_is_supported() &&
-			(starttls = xmlnode_get_child(packet, "starttls"))) {
-		jabber_send_raw(js,
-				"<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
-		return;
+	if((starttls = xmlnode_get_child(packet, "starttls"))) {
+		if(gaim_ssl_is_supported()) {
+			jabber_send_raw(js,
+					"<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
+			return;
+		} else if(xmlnode_get_child(starttls, "required")) {
+			gaim_connection_error(js->gc, _("Server requires SSL for login"));
+			return;
+		}
 	}
 
 	mechs = xmlnode_get_child(packet, "mechanisms");