<br><br><div class="gmail_quote">2008/6/6 Lucas Nussbaum <<a href="mailto:lucas@lucas-nussbaum.net">lucas@lucas-nussbaum.net</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On 06/06/08 at 17:24 +0800, darren wrote:<br>
> 2008/6/6 Lucas Nussbaum <<a href="mailto:lucas@lucas-nussbaum.net">lucas@lucas-nussbaum.net</a>>:<br>
><br>
> > reassign 483974 libxmpp4r-ruby1.8<br>
> > severity 483974 wishlist<br>
> > retitle 483974 doesn't allow to connect to googletalk [fixed in git/svn]<br>
> > thanks<br>
> > On 04/06/08 at 23:30 +0800, darren wrote:<br>
> > > 2008/6/4 darren <<a href="mailto:darren.hoo@gmail.com">darren.hoo@gmail.com</a>>:<br>
> > > > 2008/6/4 Lucas Nussbaum <<a href="mailto:lucas@lucas-nussbaum.net">lucas@lucas-nussbaum.net</a>>:<br>
> > > > On 01/06/08 at 23:40 +0800, darren wrote:<br>
> > > >> > Package: libopenssl-ruby1.8<br>
> > > >> > Version: 1.8.6.114-2<br>
> > > >> > Severity: normal<br>
> > > >> ><br>
> > > >> > I tried to connect to gtalk using xmpp4r,but failed,I tried to track<br>
> > > >> > down the problem,later found that it may be caused by this ruby<br>
> > libray.<br>
> > > >> > a simple test code to verify:<br>
> > > >> ><br>
> > > >> > ----------------<br>
> > > >> > require 'openssl'<br>
> > > >> > require 'socket'<br>
> > > >> ><br>
> > > >> ><br>
> > > >> > socket = TCPSocket.new("<a href="http://talk.google.com" target="_blank">talk.google.com</a>", 5223)<br>
> > > >> ><br>
> > > >> > ctx = OpenSSL::SSL::SSLContext.new('TLSv1')<br>
> > > >> ><br>
> > > >> > sslsocket = OpenSSL::SSL::SSLSocket.new(socket, ctx)<br>
> > > >> ><br>
> > > >> > begin<br>
> > > >> > puts "Start connect"<br>
> > > >> > sslsocket.connect<br>
> > > >> > rescue OpenSSL::SSL::SSLError => ssle<br>
> > > >> > puts "------------------#{ssle.message}---------------"<br>
> > > >> > end<br>
> > > >> ><br>
> > > >> > puts "finished"<br>
> > > >> > -----------------<br>
> > > >> ><br>
> > > >> > It failed,but gave no reason,because ssle.message was empty.<br>
> > > >> > same code runs fine on a lenny machine.<br>
> > > >><br>
> > > >> Hi darren,<br>
> > > >><br>
> > > >> Can you still reproduce this? It works fine here. Maybe it was fixed<br>
> > on<br>
> > > >> Google's side?<br>
> > > ><br>
> > > > Thanks for you response<br>
> > > > Problem exists on my Debian Sid,But I tried it on a windows box with<br>
> > ruby<br>
> > > > 1.8.6,everything just goes fine,and xmpp4r works just fine too.<br>
> > > > So I suspect it to be a Linux or rather Debian related bug.I have also<br>
> > > > downloads ruby source code and compile myself,still the problem exists.<br>
> > > ><br>
> > ><br>
> > > sorry,I have forgotten to mention that I have upgrade ruby version to<br>
> > 1.8.7<br>
> > > in unstable, running the above code gives the message now,it is :<br>
> > > SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server hello A<br>
> > > I have googled around the error message for a long time ,just don't know<br>
> > how<br>
> > > to figure out what does the error code above means.<br>
> ><br>
> > Hi Darren,<br>
> ><br>
> > I spent some time on this (since I'm also XMPP4R's original developer, I<br>
> > had some special motivation :-)<br>
> ><br>
> > XMPP4R doesn't allow to connect to Google Talk, because it needs to<br>
> > support the old SSL protocol. I added support for that in SVN. See<br>
> > <a href="http://github.com/ln/xmpp4r/commit/bedd0a0a3a18c07ffee0806c52d0e5a95a57671d" target="_blank">http://github.com/ln/xmpp4r/commit/bedd0a0a3a18c07ffee0806c52d0e5a95a57671d</a><br>
> > and<br>
> > <a href="http://github.com/ln/xmpp4r/commit/d232fdeec59b4f4517914608da95099349eaa418" target="_blank">http://github.com/ln/xmpp4r/commit/d232fdeec59b4f4517914608da95099349eaa418</a><br>
> ><br>
> > I'm reassigning this bug to libxmpp4r-ruby1.8, and lowering the severity<br>
> > to wishlist. It will be fixed when we make a new XMPP4R release and I<br>
> > update the Debian package.<br>
><br>
> Thanks,it works for me now.Actullay I have also noticed the patch submitted<br>
> by "Ò¦´ºÁÖ"(a chinese name with three chinese charaters if you can not see<br>
> this correctly ) who is also chinese like me,but It's so old that I deem it<br>
> not related.<br>
><br>
> I looked through the patch and found that it is not so friendly to the user<br>
> developper.<br>
> cl.connect("<a href="http://talk.l.google.com" target="_blank">talk.l.google.com</a>", 5223, true) # use port 5223 and SSL mode<br>
> I have to specify the host here which we can get by resolving it from jid's<br>
> domain part, can we use an attr like use_old_ssl as allow_ssl does?<br>
> just a suggestion.<br>
<br>
</div></div>We could, if you send a patch :-)<br>
<div class="Ih2E3d"></div> </blockquote><div>Hi Lucas,<br> I have forked xmpp4r on GitHub,There are many discussions about GitHub on the xmpp4r-dev mailinglist,<br> So I just gave it a try<br> I've commited my code,but I can not find it changed on the code browser,strange indeed.<br>
So I attached the diff <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
> I am not very handy on tls/ssl,just get confused which is new and which is<br>
> deprecated ssl used by google,can you refer me to anything related?<br>
<br>
</div>TLS over negociation on port 5222 is the recommended practice and is<br>
part of the XMPP standard.<br>
</blockquote><div>I found that gtalk actually accepts ssl connection on port 5222<br><br>I just don't understand why the original code works on a windows box.<br><br>as to the code lines:<br> sslsocket = OpenSSL::SSL::SSLSocket.new(@socket)<br>
sslsocket = OpenSSL::SSL::SSLSocket.new(@socket, ctx)<br><br> what's the difference? I can not find any documentaion for this since "ri OpenSSL::SSL" gives nothing.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
direct SSL connection on 5223 is deprecated, used by google, and not<br>
part of the XMPP standard.<br>
<font color="#888888">--<br>
</font><div><div></div><div class="Wj3C7c">| Lucas Nussbaum<br>
| <a href="mailto:lucas@lucas-nussbaum.net">lucas@lucas-nussbaum.net</a> <a href="http://www.lucas-nussbaum.net/" target="_blank">http://www.lucas-nussbaum.net/</a> |<br>
| jabber: <a href="mailto:lucas@nussbaum.fr">lucas@nussbaum.fr</a> GPG: 1024D/023B3F4F |<br>
</div></div></blockquote></div><br>