diff options
author | Xabier de Zuazo <xabier@onddo.com> | 2014-07-01 10:27:54 +0200 |
---|---|---|
committer | Xabier de Zuazo <xabier@onddo.com> | 2014-07-01 10:59:26 +0200 |
commit | 4d3932688018c68505579df3859de6f28712cc2a (patch) | |
tree | 814a3e8d8b93baa1a3f26d3a5694302f88b304b4 | |
parent | 82143c71b70d7790539d07f3dbda1f74000fc139 (diff) | |
download | chef-4d3932688018c68505579df3859de6f28712cc2a.tar.gz |
[CHEF-5356-gcm] Avoid testing GCM with ruby or OpenSSL versions
-rw-r--r-- | spec/unit/encrypted_data_bag_item_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/unit/encrypted_data_bag_item_spec.rb b/spec/unit/encrypted_data_bag_item_spec.rb index 68447fd6fb..68379e2f17 100644 --- a/spec/unit/encrypted_data_bag_item_spec.rb +++ b/spec/unit/encrypted_data_bag_item_spec.rb @@ -92,7 +92,8 @@ describe Chef::EncryptedDataBagItem::Encryptor do end end - describe "when using version 3 format" do + describe "when using version 3 format", + :if => (RUBY_VERSION >= "2" and OpenSSL::OPENSSL_VERSION_NUMBER >= 10001000) do before do Chef::Config[:data_bag_encrypt_version] = 3 @@ -129,7 +130,9 @@ describe Chef::EncryptedDataBagItem::Decryptor do let(:encryption_key) { "passwd" } let(:decryption_key) { encryption_key } - context "when decrypting a version 3 (JSON+aes-256-gcm+random iv+auth tag) encrypted value" do + context "when decrypting a version 3 (JSON+aes-256-gcm+random iv+auth tag) encrypted value", + :if => (RUBY_VERSION >= "2" and OpenSSL::OPENSSL_VERSION_NUMBER >= 10001000) do + let(:encrypted_value) do Chef::EncryptedDataBagItem::Encryptor::Version3Encryptor.new(plaintext_data, encryption_key).for_encrypted_item end |