Skip to content
Browse files

Set verify_mode to VERIFY_NONE when using ssl

Closes gh-67
  • Loading branch information...
1 parent d5b023c commit 1b257c80513410e13433bb27dc4a70a644afb77e @sandro sandro committed Feb 13, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/httparty/request.rb
View
3 lib/httparty/request.rb
@@ -75,6 +75,8 @@ def perform
def attach_ssl_certificates(http)
if http.use_ssl?
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
+
# Client certificate authentication
if options[:pem]
http.cert = OpenSSL::X509::Certificate.new(options[:pem])
@@ -87,6 +89,7 @@ def attach_ssl_certificates(http)
http.ca_file = options[:ssl_ca_file]
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
end
+
if options[:ssl_ca_path]
http.ca_path = options[:ssl_ca_path]
http.verify_mode = OpenSSL::SSL::VERIFY_PEER

0 comments on commit 1b257c8

Please sign in to comment.
Something went wrong with that request. Please try again.