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:
parent
d5b023c905
commit
1b257c8051
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue