summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-12-11 10:31:27 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2016-01-25 09:51:06 -0800
commit0a3affad66cadc1e9a32afc31160cc1304ef331b (patch)
tree78fb30b87357173e9664c592ca63bc442c2cafbd /spec
parentd999373538ad9861ad8176d2ecd1ead02d487814 (diff)
downloadchef-0a3affad66cadc1e9a32afc31160cc1304ef331b.tar.gz
Use sign v1.3 when fips mode is selected
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/client_spec.rb19
1 files changed, 17 insertions, 2 deletions
diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb
index 3b4d23da6e..26cc8f3cf9 100644
--- a/spec/unit/client_spec.rb
+++ b/spec/unit/client_spec.rb
@@ -45,8 +45,23 @@ describe Chef::Client do
end
describe "authentication protocol selection" do
- it "defaults to 1.1" do
- expect(Chef::Config[:authentication_protocol_version]).to eq("1.1")
+ context "when openssl is not compiled with the FIPS module" do
+ it "defaults to 1.1" do
+ expect(Chef::Config[:authentication_protocol_version]).to eq("1.1")
+ end
+ end
+ context "when openssl is compiled with the FIPS module" do
+ before do
+ Chef::Config[:openssl_fips] = true
+ end
+
+ it "defaults to 1.3" do
+ expect(Chef::Config[:authentication_protocol_version]).to eq("1.3")
+ end
+
+ after do
+ Chef::Config[:openssl_fips] = false
+ end
end
end