fails to connect to gtalk (TLS)

D

darren

Platform : Debian GNU/Linux Unstable
Ruby version: ruby 1.8.7 (2008-05-31 patchlevel 0) [i486-linux]

here is the sample code:
----------------
require 'openssl'
require 'socket'

socket = TCPSocket.new("talk.google.com", 5223)
ctx = OpenSSL::SSL::SSLContext.new('TLSv1')

sslsocket = OpenSSL::SSL::SSLSocket.new(socket, ctx)

begin
puts "Start connect"
sslsocket.connect
rescue OpenSSL::SSL::SSLError => ssle
puts "------------------#{ssle.message}---------------"
end

puts "finished"
-----------------
it fails to connect with message:

SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server hello A

while the sample code runs pretty ok on windows with ruby stable
version.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top