1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Set verify_mode to VERIFY_NONE when using ssl

Closes gh-67
This commit is contained in:
Sandro Turriate 2011-02-13 13:08:00 -07:00
parent d5b023c905
commit 1b257c8051

View file

@ -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