changeset 22800:abd261518b83

When an XMPP account is set to require TLS, but libpurple doesn't have SSL support, display an error message and give up before actually logging in.
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 01 May 2008 04:02:31 +0000
parents a8a2268ce925
children 8ad9c318613f
files libpurple/protocols/jabber/auth.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/auth.c	Thu May 01 03:55:48 2008 +0000
+++ b/libpurple/protocols/jabber/auth.c	Thu May 01 04:02:31 2008 +0000
@@ -54,6 +54,11 @@
 				PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
 				_("Server requires TLS/SSL for login.  No TLS/SSL support found."));
 			return TRUE;
+		} else if(purple_account_get_bool(js->gc->account, "require_tls", FALSE)) {
+			purple_connection_error_reason (js->gc,
+				 PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT,
+				_("You require encryption, but no TLS/SSL support found."));
+			return TRUE;
 		}
 	}