aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/siacs/conversations/xmpp')
-rw-r--r--src/eu/siacs/conversations/xmpp/XmppConnection.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java
index 36bd4be2..4baf5fae 100644
--- a/src/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -210,11 +210,16 @@ public class XmppConnection implements Runnable {
processStream(tagReader.readTag());
break;
} else if (nextTag.isStart("failure")) {
- tagReader.readElement(nextTag);
+ Element failure = tagReader.readElement(nextTag);
+ Log.d(LOGTAG,"login failure"+failure);
changeStatus(Account.STATUS_UNAUTHORIZED);
} else if (nextTag.isStart("challenge")) {
String challange = tagReader.readElement(nextTag).getContent();
- Log.d(LOGTAG,"a challange arrived! "+challange);
+ Element response = new Element("response");
+ response.setAttribute("xmlns", "urn:ietf:params:xml:ns:xmpp-sasl");
+ response.setContent(CryptoHelper.saslDigestMd5(account, challange));
+ Log.d(LOGTAG,response.toString());
+ tagWriter.writeElement(response);
} else if (nextTag.isStart("enabled")) {
this.stanzasSent = 0;
Element enabled = tagReader.readElement(nextTag);