<br><br><div class="gmail_quote">2008/6/6 Lucas Nussbaum &lt;<a href="mailto:lucas@lucas-nussbaum.net">lucas@lucas-nussbaum.net</a>&gt;:<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&#39;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>
&gt; 2008/6/4 darren &lt;<a href="mailto:darren.hoo@gmail.com">darren.hoo@gmail.com</a>&gt;:<br>
</div><div><div></div><div class="Wj3C7c">&gt; &gt; 2008/6/4 Lucas Nussbaum &lt;<a href="mailto:lucas@lucas-nussbaum.net">lucas@lucas-nussbaum.net</a>&gt;:<br>
&gt; &gt; On 01/06/08 at 23:40 +0800, darren wrote:<br>
&gt; &gt;&gt; &gt; Package: libopenssl-ruby1.8<br>
&gt; &gt;&gt; &gt; Version: 1.8.6.114-2<br>
&gt; &gt;&gt; &gt; Severity: normal<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; I tried to connect to gtalk using xmpp4r,but failed,I tried to track<br>
&gt; &gt;&gt; &gt; down the problem,later found that it may be caused by this ruby libray.<br>
&gt; &gt;&gt; &gt; a simple test code to verify:<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; ----------------<br>
&gt; &gt;&gt; &gt; require &#39;openssl&#39;<br>
&gt; &gt;&gt; &gt; require &#39;socket&#39;<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; socket = TCPSocket.new(&quot;<a href="http://talk.google.com" target="_blank">talk.google.com</a>&quot;, 5223)<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; ctx = OpenSSL::SSL::SSLContext.new(&#39;TLSv1&#39;)<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; sslsocket = OpenSSL::SSL::SSLSocket.new(socket, ctx)<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; begin<br>
&gt; &gt;&gt; &gt; &nbsp; puts &quot;Start connect&quot;<br>
&gt; &gt;&gt; &gt; &nbsp; &nbsp; sslsocket.connect<br>
&gt; &gt;&gt; &gt; rescue OpenSSL::SSL::SSLError =&gt; ssle<br>
&gt; &gt;&gt; &gt; &nbsp; &nbsp; puts &quot;------------------#{ssle.message}---------------&quot;<br>
&gt; &gt;&gt; &gt; end<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; puts &quot;finished&quot;<br>
&gt; &gt;&gt; &gt; -----------------<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; It failed,but gave no reason,because ssle.message was empty.<br>
&gt; &gt;&gt; &gt; same code runs fine on a lenny machine.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Hi darren,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Can you still reproduce this? It works fine here. Maybe it was fixed on<br>
&gt; &gt;&gt; Google&#39;s side?<br>
&gt; &gt;<br>
&gt; &gt; Thanks for you response<br>
&gt; &gt; Problem exists on my Debian Sid,But I tried it on a windows box with ruby<br>
&gt; &gt; 1.8.6,everything just goes fine,and xmpp4r works just fine too.<br>
&gt; &gt; So I suspect it to be a Linux or rather Debian related bug.I have also<br>
&gt; &gt; downloads ruby source code and compile myself,still the problem exists.<br>
&gt; &gt;<br>
&gt;<br>
</div></div><div class="Ih2E3d">&gt; sorry,I have forgotten to mention that I have upgrade ruby version to 1.8.7<br>
&gt; in unstable, running the above code gives the message now,it is :<br>
&gt; &nbsp; &nbsp;SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server hello A<br>
&gt; I have googled around the error message for a long time ,just don&#39;t know how<br>
&gt; 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&#39;m also XMPP4R&#39;s original developer, I<br>
had some special motivation :-)<br>
<br>
XMPP4R doesn&#39;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&#39;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.&nbsp;</blockquote><div>Thanks,it works for me now.Actullay I have also noticed the patch submitted by&nbsp; &quot;姚春林&quot;(a chinese name with three chinese charaters if you can not see this correctly ) who is also chinese like me,but It&#39;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(&quot;<a href="http://talk.l.google.com">talk.l.google.com</a>&quot;, 5223, true) # use port 5223 and SSL mode<br>I have to specify the host here which we can get by&nbsp; resolving it from jid&#39;s domain part, can we use an attr&nbsp; like&nbsp; use_old_ssl&nbsp; 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> &nbsp; <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> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GPG: 1024D/023B3F4F |<br>
</font></blockquote></div><br>