Mercurial > pidgin
changeset 28330:51ba542e05eb
merge of '319a1520a23092d6a84cf888dd358669dd7ba7c3'
and 'e692d9b569a972cd784a93d577784b7b96503ee2'
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Tue, 06 Oct 2009 03:34:05 +0000 |
parents | aa619162370b (current diff) c5280f5677b5 (diff) |
children | 11c98889d0a6 42fc2fc14db2 |
files | |
diffstat | 5 files changed, 53 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c Mon Oct 05 20:02:09 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Tue Oct 06 03:34:05 2009 +0000 @@ -68,8 +68,6 @@ #include "jingle/jingle.h" #include "jingle/rtp.h" -#define JABBER_CONNECT_STEPS (js->gsc ? 9 : 5) - PurplePlugin *jabber_plugin = NULL; GList *jabber_features = NULL; GList *jabber_identities = NULL; @@ -198,9 +196,10 @@ void jabber_stream_features_parse(JabberStream *js, xmlnode *packet) { if(xmlnode_get_child(packet, "starttls")) { - if(jabber_process_starttls(js, packet)) - + if(jabber_process_starttls(js, packet)) { + jabber_stream_set_state(js, JABBER_STREAM_INITIALIZING_ENCRYPTION); return; + } } else if(purple_account_get_bool(js->gc->account, "require_tls", FALSE) && !jabber_stream_is_ssl(js)) { purple_connection_error_reason(js->gc, PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR, @@ -211,6 +210,7 @@ if(js->registration) { jabber_register_start(js); } else if(xmlnode_get_child(packet, "mechanisms")) { + jabber_stream_set_state(js, JABBER_STREAM_AUTHENTICATING); jabber_auth_start(js, packet); } else if(xmlnode_get_child(packet, "bind")) { xmlnode *bind, *resource; @@ -289,8 +289,10 @@ if(js->state == JABBER_STREAM_AUTHENTICATING) jabber_auth_handle_failure(js, *packet); } else if(!strcmp((*packet)->name, "proceed")) { - if(js->state == JABBER_STREAM_AUTHENTICATING && !js->gsc) + if (js->state == JABBER_STREAM_INITIALIZING_ENCRYPTION && !js->gsc) tls_init(js); + else + purple_debug_warning("jabber", "Ignoring spurious <proceed/>\n"); } else { purple_debug(PURPLE_DEBUG_WARNING, "jabber", "Unknown packet: %s\n", (*packet)->name); @@ -1570,6 +1572,8 @@ void jabber_stream_set_state(JabberStream *js, JabberStreamState state) { +#define JABBER_CONNECT_STEPS ((js->gsc || js->state == JABBER_STREAM_INITIALIZING_ENCRYPTION) ? 9 : 5) + js->state = state; switch(state) { case JABBER_STREAM_OFFLINE: @@ -1607,6 +1611,8 @@ purple_connection_set_state(js->gc, PURPLE_CONNECTED); break; } + +#undef JABBER_CONNECT_STEPS } char *jabber_get_next_id(JabberStream *js)
--- a/libpurple/protocols/jabber/parser.c Mon Oct 05 20:02:09 2009 +0000 +++ b/libpurple/protocols/jabber/parser.c Tue Oct 06 03:34:05 2009 +0000 @@ -62,11 +62,6 @@ g_free(attrib); } } - if(js->protocol_version == JABBER_PROTO_0_9) - js->auth_type = JABBER_AUTH_IQ_AUTH; - - if(js->state == JABBER_STREAM_INITIALIZING || js->state == JABBER_STREAM_INITIALIZING_ENCRYPTION) - jabber_stream_set_state(js, JABBER_STREAM_AUTHENTICATING); } else { if(js->current) @@ -256,5 +251,17 @@ break; } } + + if (js->protocol_version == JABBER_PROTO_0_9 && !js->gc->disconnect_timeout && + (js->state == JABBER_STREAM_INITIALIZING || + js->state == JABBER_STREAM_INITIALIZING_ENCRYPTION)) { + /* + * Legacy servers don't advertise features, so if we've just gotten + * the opening <stream:stream> and there was no version, we need to + * immediately start legacy IQ auth. + */ + js->auth_type = JABBER_AUTH_IQ_AUTH; + jabber_stream_set_state(js, JABBER_STREAM_AUTHENTICATING); + } }
--- a/pidgin/win32/nsis/pidgin-installer.nsi Mon Oct 05 20:02:09 2009 +0000 +++ b/pidgin/win32/nsis/pidgin-installer.nsi Tue Oct 06 03:34:05 2009 +0000 @@ -717,6 +717,7 @@ Delete "$INSTDIR\ca-certs\AOL_Member_CA.pem" Delete "$INSTDIR\ca-certs\CAcert_Class3.pem" Delete "$INSTDIR\ca-certs\CAcert_Root.pem" + Delete "$INSTDIR\ca-certs\Entrust.net_Secure_Server_CA.pem" Delete "$INSTDIR\ca-certs\Equifax_Secure_CA.pem" Delete "$INSTDIR\ca-certs\Equifax_Secure_Global_eBusiness_CA-1.pem" Delete "$INSTDIR\ca-certs\GTE_CyberTrust_Global_Root.pem"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/ca-certs/Entrust.net_Secure_Server_CA.pem Tue Oct 06 03:34:05 2009 +0000 @@ -0,0 +1,28 @@ +-----BEGIN CERTIFICATE----- +MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC +VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u +ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc +KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u +ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1 +MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE +ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j +b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF +bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg +U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA +A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/ +I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5gXpa0zf3 +wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OC +AdcwggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHb +oIHYpIHVMIHSMQswCQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5 +BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1p +dHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1pdGVk +MTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRp +b24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu +dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0 +MFqBDzIwMTkwNTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8Bdi +E1U9s/8KAGv7UISX8+1i0BowHQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAa +MAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EABAwwChsEVjQuMAMCBJAwDQYJKoZI +hvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyNEwr75Ji174z4xRAN +95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9n9cd +2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI= +-----END CERTIFICATE-----
--- a/share/ca-certs/Makefile.am Mon Oct 05 20:02:09 2009 +0000 +++ b/share/ca-certs/Makefile.am Tue Oct 06 03:34:05 2009 +0000 @@ -2,6 +2,7 @@ America_Online_Root_Certification_Authority_1.pem \ CAcert_Root.pem \ CAcert_Class3.pem \ + Entrust.net_Secure_Server_CA.pem \ Equifax_Secure_CA.pem \ Equifax_Secure_Global_eBusiness_CA-1.pem \ GTE_CyberTrust_Global_Root.pem \