<div class="gmail_quote">On Thu, Feb 18, 2010 at 4:04 AM, IRcapmail <span dir="ltr"><<a href="mailto:ircapmail@yahoo.es">ircapmail@yahoo.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
2. Compute the 16 octet MD5 hash of X. Call the result Y.<br>
<br>
%Y = $md5(%X)<br>
<br>
Result= 85434cc70bb832bc456c27834bfa5d25<br>
<br></blockquote><div><br></div><div>This is incorrect. You need 16 octets, but your result is 32 octets. Don't hex encode in this step.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
3. Create a string of the form "Y:nonce:cnonce:authzid". Call this string A1.<br>
<br>
%A1 = %Y $+ :x8djfKCd/aoKCUIeI5IwN0lNGzs91oSdMCR7SZT6L9s=:EzAaOdnJwGDj2ABlUat3a1ZPeH06Pyzic6PpnVnqkBE=:<a href="http://testuser456@jabber.org/Psi" target="_blank">testuser456@jabber.org/Psi</a><br>
<br>
Result= 85434cc70bb832bc456c27834bfa5d25:x8djfKCd/aoKCUIeI5IwN0lNGzs91oSdMCR7SZT6L9s=:EzAaOdnJwGDj2ABlUat3a1ZPeH06Pyzic6PpnVnqkBE=:<a href="http://testuser456@jabber.org/Psi" target="_blank">testuser456@jabber.org/Psi</a><br>
<br></blockquote><div><br></div><div>You are including an authzid here, Psi didn't. When there is no authzid, you use:</div><div>A1 = Y:nonce:cnonce</div><div><br></div><div>A note about authzid: You must not provide an authzid when it's the same as the JID you are logging in with. And when provided, it has to be a bare JID. See the spec: <a href="http://xmpp.org/internet-drafts/draft-ietf-xmpp-3920bis-04.html#sasl-rules-authzid">http://xmpp.org/internet-drafts/draft-ietf-xmpp-3920bis-04.html#sasl-rules-authzid</a></div>
<div><br></div><div>The rest of your code is correct, and I managed to get the correct result with the above two fixes.</div><div><br></div><div>--</div><div>Waqas Hussain</div><div><br></div></div>