lib/rubygems_plugin.rb in rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.58 vs lib/rubygems_plugin.rb in rubygems_ssl-client-certs-0.0.3.pre.alpha.pre.59
- old
+ new
@@ -39,10 +39,11 @@
class Gem::RemoteFetcher
def connection_for(uri)
net_http_args = [uri.host, uri.port]
+ $stdout.puts "running patched connection_for"
if @proxy_uri and not no_proxy?(uri.host) then
net_http_args += [
@proxy_uri.host,
@proxy_uri.port,
@@ -73,21 +74,26 @@
connection.verify_mode =
Gem.configuration.ssl_verify_mode || OpenSSL::SSL::VERIFY_PEER
store = OpenSSL::X509::Store.new
if Gem.configuration.ssl_client_cert
+ $stdout.puts "configuring client ssl cert"
pem = File.read(Gem.configuration.ssl_client_cert)
connection.cert = OpenSSL::X509::Certificate.new(pem)
connection.key = OpenSSL::PKey::RSA.new(pem)
+ else
+ $stdout.puts "no client cert given"
end
if Gem.configuration.ssl_ca_cert
+ $stdout.puts "configuring ca certs"
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
+ $stdout.puts "using default ca certs"
store.set_default_paths
add_rubygems_trusted_certs(store)
end
connection.cert_store = store
rescue LoadError => e