Mercurial > pidgin.yaz
comparison libpurple/protocols/oscar/oscar.c @ 24652:d3f47707e260
Part 2 of the continuing effort to get OSCAR over SSL working.
* Request SSL when getting new FLAP connections and parse the returned
attributes (regarding what to use as the SSL common name).
* Work around what is apparently weird buginess with FLAP connections
to SNAC families ADMIN and BART (they don't like SSL).
SSL connections still pop up certificate warnings.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Thu, 11 Dec 2008 07:14:50 +0000 |
parents | ea70a446dde4 |
children | c6772d61af1f |
comparison
equal
deleted
inserted
replaced
24651:ea70a446dde4 | 24652:d3f47707e260 |
---|---|
1954 port = atoi(separator + 1); | 1954 port = atoi(separator + 1); |
1955 } | 1955 } |
1956 else | 1956 else |
1957 host = g_strdup(redir->ip); | 1957 host = g_strdup(redir->ip); |
1958 | 1958 |
1959 purple_debug_info("oscar", "Connecting to FLAP server %s:%d of type 0x%04hx\n", | 1959 /* |
1960 host, port, redir->group); | 1960 * These FLAP servers advertise SSL (type "0x02"), but SSL connections to these hosts |
1961 * die a painful death. iChat and Miranda, when using SSL, still do these in plaintext. | |
1962 */ | |
1963 if (redir->use_ssl && (redir->group == SNAC_FAMILY_ADMIN || | |
1964 redir->group == SNAC_FAMILY_BART)) | |
1965 { | |
1966 purple_debug_info("oscar", "Ignoring broken SSL for FLAP type 0x%04hx.\n", | |
1967 redir->group); | |
1968 redir->use_ssl = 0; | |
1969 } | |
1970 | |
1971 purple_debug_info("oscar", "Connecting to FLAP server %s:%d of type 0x%04hx%s\n", | |
1972 host, port, redir->group, | |
1973 od->use_ssl && !redir->use_ssl ? " without SSL, despite main stream encryption" : ""); | |
1974 | |
1961 newconn = flap_connection_new(od, redir->group); | 1975 newconn = flap_connection_new(od, redir->group); |
1962 newconn->cookielen = redir->cookielen; | 1976 newconn->cookielen = redir->cookielen; |
1963 newconn->cookie = g_memdup(redir->cookie, redir->cookielen); | 1977 newconn->cookie = g_memdup(redir->cookie, redir->cookielen); |
1964 if (newconn->type == SNAC_FAMILY_CHAT) | 1978 if (newconn->type == SNAC_FAMILY_CHAT) |
1965 { | 1979 { |
1973 cc->show = extract_name(redir->chat.room); | 1987 cc->show = extract_name(redir->chat.room); |
1974 newconn->new_conn_data = cc; | 1988 newconn->new_conn_data = cc; |
1975 purple_debug_info("oscar", "Connecting to chat room %s exchange %hu\n", cc->name, cc->exchange); | 1989 purple_debug_info("oscar", "Connecting to chat room %s exchange %hu\n", cc->name, cc->exchange); |
1976 } | 1990 } |
1977 | 1991 |
1978 if (od->use_ssl) | 1992 |
1993 if (redir->use_ssl) | |
1979 { | 1994 { |
1980 newconn->gsc = purple_ssl_connect(account, host, port, | 1995 newconn->gsc = purple_ssl_connect(account, host, port, |
1981 ssl_connection_established_cb, ssl_connection_error_cb, | 1996 ssl_connection_established_cb, ssl_connection_error_cb, |
1982 newconn); | 1997 newconn); |
1983 } | 1998 } |