From 1b257c80513410e13433bb27dc4a70a644afb77e Mon Sep 17 00:00:00 2001 From: Sandro Turriate Date: Sun, 13 Feb 2011 13:08:00 -0700 Subject: [PATCH] Set verify_mode to VERIFY_NONE when using ssl Closes gh-67 --- lib/httparty/request.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/httparty/request.rb b/lib/httparty/request.rb index 9ed2f8d..c7e9053 100644 --- a/lib/httparty/request.rb +++ b/lib/httparty/request.rb @@ -75,6 +75,8 @@ module HTTParty 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 @@ module HTTParty 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