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
Received: Tue, 13 Jan 2004 05:03:07 +0900
And lo Dave wrote:
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 )
is PORT set to the correct https port? (443)
Quoting Dave Thomas <dave@pragprog.com>:
> Received: Tue, 13 Jan 2004 05:03:07 +0900
> And lo Dave wrote:
>
>>
>> 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 )
>
> is PORT set to the correct https port? (443)
Don't worry, Dave--it sounds like a design defect that's pretty easy to forget.
Anyone know why the HTTPS class doesn't provide its own new() with 443 as the
default value of 'port'?
···
On Jan 12, 2004, at 14:16, Gregory Millam wrote:
--
jason
:wq
___________________________________________________________
This mail sent using ToadMail -- Web based e-mail @ ToadNet