Mercurial > pidgin
comparison src/protocols/jabber/auth.c @ 8296:dd6fe7d965aa
[gaim-migrate @ 9020]
committing piecemeal sucks, but filetransfer isn't ready for prime time yet. hopefully this doesn't break anything.
this should fix the problems with empty <stream:features/> packets, fix a bug in MUC conferencing, and re-add the option for changing passwords on XMPP servers, until I write the code to actually detect that.
Hopefully this compiles, and I didn't break anything.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Thu, 19 Feb 2004 14:57:41 +0000 |
parents | 1e145b735b05 |
children | b63debdf5a92 |
comparison
equal
deleted
inserted
replaced
8295:bc850664b559 | 8296:dd6fe7d965aa |
---|---|
30 #include "debug.h" | 30 #include "debug.h" |
31 #include "md5.h" | 31 #include "md5.h" |
32 #include "util.h" | 32 #include "util.h" |
33 #include "sslconn.h" | 33 #include "sslconn.h" |
34 | 34 |
35 | 35 gboolean |
36 void | 36 jabber_process_starttls(JabberStream *js, xmlnode *packet) |
37 jabber_auth_start(JabberStream *js, xmlnode *packet) | 37 { |
38 { | |
39 xmlnode *mechs, *mechnode; | |
40 xmlnode *starttls; | 38 xmlnode *starttls; |
41 xmlnode *auth; | |
42 | |
43 gboolean digest_md5 = FALSE, plain=FALSE; | |
44 | 39 |
45 if((starttls = xmlnode_get_child(packet, "starttls"))) { | 40 if((starttls = xmlnode_get_child(packet, "starttls"))) { |
46 if(gaim_account_get_bool(js->gc->account, "use_tls", TRUE) && | 41 if(gaim_account_get_bool(js->gc->account, "use_tls", TRUE) && |
47 gaim_ssl_is_supported()) { | 42 gaim_ssl_is_supported()) { |
48 jabber_send_raw(js, | 43 jabber_send_raw(js, |
49 "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1); | 44 "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>", -1); |
50 return; | 45 return TRUE; |
51 } else if(xmlnode_get_child(starttls, "required")) { | 46 } else if(xmlnode_get_child(starttls, "required")) { |
52 gaim_connection_error(js->gc, _("Server requires SSL for login")); | 47 gaim_connection_error(js->gc, _("Server requires SSL for login")); |
53 return; | 48 return TRUE; |
54 } | 49 } |
55 } | 50 } |
51 | |
52 return FALSE; | |
53 } | |
54 | |
55 void | |
56 jabber_auth_start(JabberStream *js, xmlnode *packet) | |
57 { | |
58 xmlnode *mechs, *mechnode; | |
59 xmlnode *auth; | |
60 | |
61 gboolean digest_md5 = FALSE, plain=FALSE; | |
62 | |
56 | 63 |
57 if(js->registration) { | 64 if(js->registration) { |
58 jabber_register_start(js); | 65 jabber_register_start(js); |
59 return; | 66 return; |
60 } | 67 } |