Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
simons #1
User title: Simon shaw
Member since May 2006 · 30 posts
Group memberships: Members
Show profile · Link to this post
Subject: Digest MD5 failing
Hi Alex,

Been away for a while but when I tried to continue working I get rejected from the amessage.info server as shown by the message flow below.  If I force the SaslHandler to send a RequestLoginInfo rather than init one of the sasl.mechanisms the login works fine.

Thanks in advance,

Simon

SEND: <stream:stream to='amessage.info' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="amessage.info" version="1.0" id="1938990772" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><register xmlns="http://jabber.org/features/iq-register" /><auth xmlns="http://jabber.org/features/iq-auth" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>NTLM</mechanism><mechanism>LOGIN</mechanism><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms></stream:features>
SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5" />
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">bm9uY2U9IjVoSnE4K3hITC8rNlhxRUpOWERUeHJrOXpEMnNvckVWc2RwYXd4NklrSmM9IixyZWFsbT0iYW1lc3NhZ2UuaW5mbyIscW9wPSJhdXRoLGF1dGgtaW50LGF1dGgtY29uZiIsY2lwaGVyPSJyYzQtNDAscmM0LTU2LHJjNCxkZXMsM2RlcyIsbWF4YnVmPTEwMjQsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9InNpbW9uaGFtZWxlY2giLHJlYWxtPSJhbWVzc2FnZS5pbmZvIixub25jZT0iNWhKcTgreEhMLys2WHFFSk5YRFR4cms5ekQyc29yRVZzZHBhd3g2SWtKIixjbm9uY2U9IjE3NzU5YzNlMmFmNGE4YTA0NGNjMTk4YmZiNGM4M2RhNmIxMzYzZDExNzA0NjZlNzIwZDU0MjVmMmE4MTgzMTEiLG5jPTAwMDAwMDAxLHFvcD1hdXQsZGlnZXN0LXVyaT0ieG1wcC9hbWVzc2FnZS5pbmZvIixjaGFyc2V0PXV0Zi04LHJlc3BvbnNlPTM0M2E4MWVjMWJmMTFkNjRiNGJiOWRmYWM4MmZlZjc2</response>
RECV: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><not-authorized /></failure>
RECV: </stream:stream>
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello simons,

we can reproduce this problems. It looks like amessage and jabberd1.4 updated/changed the SASL codes and/or libraries.
agsXMPP is crashing when parsing the Digest-md5 challenge. We try to fix this problem as soon as possible and upload the new code to SVN then. For now you can choose the SASL mechanism manual and set it to SASL-Plain which should work with the amessage servers.

Alex
Avatar
simons #3
User title: Simon shaw
Member since May 2006 · 30 posts
Group memberships: Members
Show profile · Link to this post
In my tests the Sasl-PLAIN failed as well
Avatar
Alex #4
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi Simon,

SASL PLAIN works fine for me. Here is the code to specify the mechanism manual in the OnSaslStart Event of XmppClientConnection.

  1. void XmppCon_OnSaslStart(object sender, SaslEventArgs args)
  2. {
  3.     // You can define the SASL mechanism here when needed
  4.     args.Auto = false;
  5.     args.Mechanism = agsXMPP.protocol.sasl.Mechanism.GetMechanismName(agsXMPP.protocol.sasl.MechanismType.DIGEST_MD5);
  6. }

we also improved the DIGEST-MD5 stuff to work again with the amessage servers. I will release this code soon. But first i wanna make some more testing before and also talk to mawis the admin of the amessage servers and maintainer of the jabberd 1 server code about his changes. He is doing the DIGEST-MD5 auth different than all the other server programmers.

Alex
Avatar
Alex #5
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi Simon,

the fixed DIGEST-MD5 SASL classes are attached.
I hope this works for you too.

Alex
The author has attached one file to this post:
DigestMD5.zip 3.9 kBytes
You have no permission to open this file.
Avatar
simons #6
User title: Simon shaw
Member since May 2006 · 30 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

Thanks, it works.

Simon
Avatar
Alex #7
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
code is also in SVN now.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS