diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-03-31 15:22:27 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-03-31 15:22:27 +0200 |
commit | 601e5ca33ecc43a565cc2a9e9e196e72fbb7f277 (patch) | |
tree | 03076cb4f98b2a39ba506415b13ee1ced62ddda9 /src/eu/siacs/conversations/xmpp/XmppConnection.java | |
parent | aed5b01434ff6cf180433efc0fc4a817f1234740 (diff) |
fixed #30 - added support for digest-md5 - only works with Icewarp 11???git add src/?
Diffstat (limited to 'src/eu/siacs/conversations/xmpp/XmppConnection.java')
-rw-r--r-- | src/eu/siacs/conversations/xmpp/XmppConnection.java | 9 |
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); |