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.
 
Ad

Advertisements


Top