我是openssl的新手。当我尝试连接到控制台上的页面https时,它通过错误:
RestClient::Request.execute(:url => 'https://secure2.lionair.co.id/lionairibe/OnlineBooking.aspx', :ssl_version => 'SSLv3', :method => 'get')
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: wrong version number
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in `connect'
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in `block in connect'
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:74:in `timeout'
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:923:in `connect'
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:863:in `do_start'
from /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/http.rb:852:in `start'
from /var/www/rails/PROJ/vendor/bundle/ruby/2.2.0/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in `transmit'
from /var/www/rails/PROJ/vendor/bundle/ruby/2.2.0/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in `execute'
from /var/www/rails/PROJ/vendor/bundle/ruby/2.2.0/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
from (irb):1
from /var/www/rails/PROJ/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/commands/console.rb:110:in `start'
from /var/www/rails/PROJ/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/commands/console.rb:9:in `start'
from /var/www/rails/PROJ/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:68:in `console'
from /var/www/rails/PROJ/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /var/www/rails/PROJ/vendor/bundle/ruby/2.2.0/gems/railties-4.2.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
然后我尝试其他版本的ssl:'TLSv1'。错误仍然发生
RestClient::Request.execute(:url => 'https://secure2.lionair.co.id/lionairibe/OnlineBooking.aspx', :ssl_version => 'TLSv1', :method => 'get')
我正在使用xubuntu和我的openssl版本:
openssl version -a
OpenSSL 1.0.1f 6 Jan 2014
built on: Thu Jun 11 15:28:12 UTC 2015
platform: debian-amd64
options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) blowfish(idx)
compiler: cc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wa,--noexecstack -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
OPENSSLDIR: "/usr/lib/ssl"