comparison src/protocols/jabber/auth.c @ 10441:e0a4b8586cbe

[gaim-migrate @ 11701] compile warning fixes, and make an error message a little more clear as to the cause if someone wants to word it better, go right ahead committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 28 Dec 2004 07:33:51 +0000
parents a5bd6d78717d
children dc33b3b475c2
comparison
equal deleted inserted replaced
10440:0a7f03ee3a61 10441:e0a4b8586cbe
46 gaim_ssl_is_supported()) { 46 gaim_ssl_is_supported()) {
47 jabber_send_raw(js, 47 jabber_send_raw(js,
48 "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1); 48 "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1);
49 return TRUE; 49 return TRUE;
50 } else if(xmlnode_get_child(starttls, "required")) { 50 } else if(xmlnode_get_child(starttls, "required")) {
51 gaim_connection_error(js->gc, _("Server requires SSL for login")); 51 if(gaim_ssl_is_supported()) {
52 gaim_connection_error(js->gc, _("Server requires TLS/SSL for login. Select \"Enable TLS if available\" in account properties"));
53 } else {
54 gaim_connection_error(js->gc, _("Server requires TLS/SSL for login. No TLS/SSL support found."));
55 }
52 return TRUE; 56 return TRUE;
53 } 57 }
54 } 58 }
55 59
56 return FALSE; 60 return FALSE;
59 static void finish_plaintext_authentication(JabberStream *js) 63 static void finish_plaintext_authentication(JabberStream *js)
60 { 64 {
61 if(js->auth_type == JABBER_AUTH_PLAIN) { 65 if(js->auth_type == JABBER_AUTH_PLAIN) {
62 xmlnode *auth; 66 xmlnode *auth;
63 GString *response; 67 GString *response;
64 char *enc_out; 68 unsigned char *enc_out;
65 69
66 auth = xmlnode_new("auth"); 70 auth = xmlnode_new("auth");
67 xmlnode_set_attrib(auth, "xmlns", "urn:ietf:params:xml:ns:xmpp-sasl"); 71 xmlnode_set_attrib(auth, "xmlns", "urn:ietf:params:xml:ns:xmpp-sasl");
68 72
69 response = g_string_new(""); 73 response = g_string_new("");
298 { 302 {
299 md5_state_t ctx; 303 md5_state_t ctx;
300 md5_byte_t result[16]; 304 md5_byte_t result[16];
301 size_t a1len; 305 size_t a1len;
302 306
303 char *x, *a1, *ha1, *ha2, *kd, *z, *convnode, *convpasswd; 307 unsigned char *x, *a1, *ha1, *ha2, *kd, *z, *convnode, *convpasswd;
304 308
305 if((convnode = g_convert(jid->node, strlen(jid->node), "iso-8859-1", "utf-8", 309 if((convnode = g_convert(jid->node, strlen(jid->node), "iso-8859-1", "utf-8",
306 NULL, NULL, NULL)) == NULL) { 310 NULL, NULL, NULL)) == NULL) {
307 convnode = g_strdup(jid->node); 311 convnode = g_strdup(jid->node);
308 } 312 }