Skip to content

Commit

Permalink
fix when using OpenSSL::SSL::VERIFY_NONE for verify_ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
archiloque committed May 6, 2011
1 parent be781b9 commit 60742e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/restclient/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def transmit uri, req, payload, & block

net = net_http_class.new(uri.host, uri.port)
net.use_ssl = uri.is_a?(URI::HTTPS)
if @verify_ssl == false
if (@verify_ssl == false) || (@verify_ssl == OpenSSL::SSL::VERIFY_NONE)
net.verify_mode = OpenSSL::SSL::VERIFY_NONE
elsif @verify_ssl.is_a? Integer
net.verify_mode = @verify_ssl
Expand Down

0 comments on commit 60742e8

Please sign in to comment.