<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;">
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>
<div class="Ih2E3d">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>
</div><div><div></div><div class="Wj3C7c">> > 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 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 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 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>
</div></div><div class="Ih2E3d">> sorry,I have forgotten to mention that I have upgrade ruby version to 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 how<br>
> to figure out what does the error code above means.<br>
<br>
</div>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. </blockquote><div>Thanks,it works for me now.Actullay I have also noticed the patch submitted by "姚春林"(a chinese name with three chinese charaters if you can not see this correctly ) who is also chinese like me,but It's so old that I deem it not related.<br>
<br>I looked through the patch and found that it is not so friendly to the user developper.<br>cl.connect("<a href="http://talk.l.google.com">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 domain part, can we use an attr like use_old_ssl as allow_ssl does?<br>
just a suggestion.<br><br>I am not very handy on tls/ssl,just get confused which is new and which is deprecated ssl used by google,can you refer me to anything related?<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Tell me if you need help applying the diffs.<br>
<font color="#888888">--<br>
| 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>
</font></blockquote></div><br>