class Bundler::Fetcher

def bundler_cert_store

def bundler_cert_store
  store = OpenSSL::X509::Store.new
  if Bundler.settings[:ssl_ca_cert]
    if File.directory? Bundler.settings[:ssl_ca_cert]
      store.add_path Bundler.settings[:ssl_ca_cert]
    else
      store.add_file Bundler.settings[:ssl_ca_cert]
    end
  else
    store.set_default_paths
    certs = File.expand_path("../ssl_certs/*.pem", __FILE__)
    Dir.glob(certs).each { |c| store.add_file c }
  end
  store
end