D
Dave Thomas
For the first time I'm trying to connect to an https server. However,
when I try
require 'net/https'
site = Net::HTTP.new(HOST, PORT)
site.use_ssl = true
http_resp, = site.get2(SCRIPT + arg,
'Authorization' => 'Basic ' +
["xxxx:yyyy"].pack('m').strip )
I get:
warning: peer certificate won't be verified in this SSL session.
/usr/lib/ruby/1.9/net/protocols.rb:49:in `connect': unknown protocol
(OpenSSL::SSL::SSLError)
from /usr/lib/ruby/1.9/net/protocols.rb:49:in `ssl_connect'
from /usr/lib/ruby/1.9/net/https.rb:181:in `on_connect'
from /usr/lib/ruby/1.9/net/http.rb:433:in `do_start'
from /usr/lib/ruby/1.9/net/http.rb:419:in `start'
from /usr/lib/ruby/1.9/net/http.rb:824:in `request'
from /usr/lib/ruby/1.9/net/http.rb:734:in `get2'
(This is 1.9 CVS head under OSX)
Is there a magic incantation I'm missing?
Cheers
Dave
when I try
require 'net/https'
site = Net::HTTP.new(HOST, PORT)
site.use_ssl = true
http_resp, = site.get2(SCRIPT + arg,
'Authorization' => 'Basic ' +
["xxxx:yyyy"].pack('m').strip )
I get:
warning: peer certificate won't be verified in this SSL session.
/usr/lib/ruby/1.9/net/protocols.rb:49:in `connect': unknown protocol
(OpenSSL::SSL::SSLError)
from /usr/lib/ruby/1.9/net/protocols.rb:49:in `ssl_connect'
from /usr/lib/ruby/1.9/net/https.rb:181:in `on_connect'
from /usr/lib/ruby/1.9/net/http.rb:433:in `do_start'
from /usr/lib/ruby/1.9/net/http.rb:419:in `start'
from /usr/lib/ruby/1.9/net/http.rb:824:in `request'
from /usr/lib/ruby/1.9/net/http.rb:734:in `get2'
(This is 1.9 CVS head under OSX)
Is there a magic incantation I'm missing?
Cheers
Dave