aboutsummaryrefslogtreecommitdiffstats
path: root/spec/other
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2014-11-11 17:30:32 -0800
committerAndre Arko <andre@arko.net>2014-11-11 20:19:46 -0800
commit012a388d9d4289f60df1d85da0c5a64944b3b7dd (patch)
tree742e223122bf59a65a667233601cf9316d0427fe /spec/other
parent62c9267e6bdfc627fb229883f30f514824581584 (diff)
downloadbundler-012a388d9d4289f60df1d85da0c5a64944b3b7dd.tar.gz
Update SSL certificates, again.
Why did openssl give me a certificate that doesn’t work to connect? :( Also remove the intermediate certificates that aren’t actually needed to validate a connection to the server. Finally, include tests to make sure that Bundler can connect to each of the important Rubygems hosts using only the vendored certificates (h/t @luislavena for an example test).
Diffstat (limited to 'spec/other')
-rw-r--r--spec/other/ssl_cert_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/other/ssl_cert_spec.rb b/spec/other/ssl_cert_spec.rb
index ac9283a2..04f7a1f2 100644
--- a/spec/other/ssl_cert_spec.rb
+++ b/spec/other/ssl_cert_spec.rb
@@ -1,10 +1,23 @@
require 'spec_helper'
require 'bundler/ssl_certs/certificate_manager'
-describe "SSL Certificates", :if => (ENV['RGV'] == "master") do
+describe "SSL Certificates", :rubygems_master do
it "are up to date with Rubygems" do
rubygems = File.expand_path("../../../tmp/rubygems", __FILE__)
manager = Bundler::SSLCerts::CertificateManager.new(rubygems)
expect(manager).to be_up_to_date
end
+
+ hosts = %w(
+ d2chzxaqi4y7f8.cloudfront.net
+ rubygems.org
+ s3.amazonaws.com
+ staging.rubygems.org
+ )
+
+ hosts.each do |host|
+ it "can securely connect to #{host}", :realworld do
+ Bundler::SSLCerts::CertificateManager.new.connect_to(host)
+ end
+ end
end