Skip to content

Commit

Permalink
configured ca cert file is in addition to default ca certs
Browse files Browse the repository at this point in the history
  • Loading branch information
zebardy authored and drbrain committed Jan 22, 2014
1 parent d0e47f8 commit 1287e22
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rubygems/request.rb
Expand Up @@ -48,15 +48,14 @@ def configure_connection_for_https(connection)
connection.key = OpenSSL::PKey::RSA.new pem
end

store.set_default_paths
add_rubygems_trusted_certs(store)
if Gem.configuration.ssl_ca_cert
if File.directory? Gem.configuration.ssl_ca_cert
store.add_path Gem.configuration.ssl_ca_cert
else
store.add_file Gem.configuration.ssl_ca_cert
end
else
store.set_default_paths
add_rubygems_trusted_certs(store)
end
connection.cert_store = store
rescue LoadError => e
Expand Down

0 comments on commit 1287e22

Please sign in to comment.