comparison libpurple/protocols/jabber/auth.c @ 26947:131e41a24d95

Require SSL when trying IQ-auth via parser.c (no stream:features). Fixes #8131.
author Paul Aurich <paul@darkrain42.org>
date Mon, 25 May 2009 00:32:55 +0000
parents bc7fac8e2f79
children e696a0740a85
comparison
equal deleted inserted replaced
26945:6e8f56783e97 26947:131e41a24d95
687 void jabber_auth_start_old(JabberStream *js) 687 void jabber_auth_start_old(JabberStream *js)
688 { 688 {
689 JabberIq *iq; 689 JabberIq *iq;
690 xmlnode *query, *username; 690 xmlnode *query, *username;
691 691
692 /* We can end up here without encryption if the server doesn't support
693 * <stream:features/> and we're not using old-style SSL. If the user
694 * is requiring SSL/TLS, we need to enforce it.
695 */
696 if (!jabber_stream_is_ssl(js) &&
697 purple_account_get_bool(purple_connection_get_account(js->gc), "require_tls", FALSE)) {
698 purple_connection_error_reason (js->gc,
699 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR,
700 _("You require encryption, but it is not available on this server."));
701 return;
702 }
703
692 #ifdef HAVE_CYRUS_SASL 704 #ifdef HAVE_CYRUS_SASL
693 /* If we have Cyrus SASL, then passwords will have been set 705 /* If we have Cyrus SASL, then passwords will have been set
694 * to OPTIONAL for this protocol. So, we need to do our own 706 * to OPTIONAL for this protocol. So, we need to do our own
695 * password prompting here 707 * password prompting here
696 */ 708 */