From 1f3472f71ae867d9fc5e5482a355f12465c23ece Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Sun, 29 Aug 2010 12:01:32 +0000 Subject: fix SASL authentication : - on the client side, check the second challenge we receive - on the server side, send second challenge --- src/QXmppUtils.cpp | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'src/QXmppUtils.cpp') diff --git a/src/QXmppUtils.cpp b/src/QXmppUtils.cpp index ecd25e83..5879f3a8 100644 --- a/src/QXmppUtils.cpp +++ b/src/QXmppUtils.cpp @@ -299,25 +299,6 @@ QString unescapeString(const QString& str) return strOut; } -QByteArray calculateDigestMd5(const QByteArray &a1, - const QByteArray &nonce, const QByteArray &nc, const QByteArray &cnonce, - const QByteArray &digest_uri, const QByteArray &authzid) -{ - QByteArray ha1 = QCryptographicHash::hash(a1, QCryptographicHash::Md5); - ha1 += ':' + nonce + ':' + cnonce; - - if (!authzid.isEmpty()) - ha1 += ':' + authzid; - - QByteArray A1(ha1); - QByteArray A2 = "AUTHENTICATE:" + digest_uri; - QByteArray HA1 = QCryptographicHash::hash(A1, QCryptographicHash::Md5).toHex(); - QByteArray HA2 = QCryptographicHash::hash(A2, QCryptographicHash::Md5).toHex(); - QByteArray KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' - + "auth" + ':' + HA2; - return QCryptographicHash::hash(KD, QCryptographicHash::Md5); -} - QMap parseDigestMd5(const QByteArray &ba) { QMap map; -- cgit v1.2.3