Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update connection adapter to only trust ssl_ca_* #702

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/httparty/connection_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,11 @@ def attach_ssl_certificates(http, options)
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
if options[:cert_store]
http.cert_store = options[:cert_store]
else
# Use the default cert store by default, i.e. system ca certs
http.cert_store = self.class.default_cert_store
else
unless options[:ssl_ca_file] or options[:ssl_ca_path]
# Use the default cert store by default, i.e. system ca certs unless ssl_ca_file or ssl_ca_path is used
http.cert_store = self.class.default_cert_store
end
end
else
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
Expand Down