From 4d3932688018c68505579df3859de6f28712cc2a Mon Sep 17 00:00:00 2001 From: Xabier de Zuazo Date: Tue, 1 Jul 2014 10:27:54 +0200 Subject: [CHEF-5356-gcm] Avoid testing GCM with ruby or OpenSSL versions --- spec/unit/encrypted_data_bag_item_spec.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'spec') 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 -- cgit v1.2.1