summaryrefslogtreecommitdiff
path: root/spec/unit/http
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-10-18 10:54:32 -0700
committerdanielsdeleo <dan@opscode.com>2013-10-18 11:07:08 -0700
commitb0e918b22ae15a58af61c16509fafe82dc97cc16 (patch)
tree0a122daa16ffd3cd64685c858c42ce9f09cbff67 /spec/unit/http
parent4761c2e27ddb8dafcf224e4c51d3146ceba1f26f (diff)
downloadchef-b0e918b22ae15a58af61c16509fafe82dc97cc16.tar.gz
Fix error caused by loading duplicate trusted certs
Diffstat (limited to 'spec/unit/http')
-rw-r--r--spec/unit/http/ssl_policies_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/http/ssl_policies_spec.rb b/spec/unit/http/ssl_policies_spec.rb
index c80f989180..b95e13a370 100644
--- a/spec/unit/http/ssl_policies_spec.rb
+++ b/spec/unit/http/ssl_policies_spec.rb
@@ -139,6 +139,15 @@ describe "HTTP SSL Policy" do
# The system under test **SHOULD** do both of these things.
http_client.cert_store.verify(additional_pem).should be_true
end
+
+ context "and some certs are duplicates" do
+ it "skips duplicate certs" do
+ # For whatever reason, OpenSSL errors out when adding a
+ # cert you already have to the certificate store.
+ ssl_policy.set_custom_certs
+ ssl_policy.set_custom_certs #should not raise an error
+ end
+ end
end
end