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

Always set OpenSSL default paths #772

Merged
merged 1 commit into from Jan 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/excon/ssl_socket.rb
Expand Up @@ -54,11 +54,13 @@ def initialize(data = {})
ssl_context.cert_store = cert_store
end

# no defaults, fallback to bundled
unless ca_file || ca_path || cert_store
if cert_store.nil?
ssl_context.cert_store = OpenSSL::X509::Store.new
ssl_context.cert_store.set_default_paths
end

# no defaults, fallback to bundled
unless ca_file || ca_path || cert_store
# workaround issue #257 (JRUBY-6970)
ca_file = DEFAULT_CA_FILE
ca_file = ca_file.gsub(/^jar:/, '') if ca_file =~ /^jar:file:\//
Expand Down