summaryrefslogtreecommitdiff
path: root/spec/support/platform_helpers.rb
diff options
context:
space:
mode:
authorClaire McQuin <mcquin@users.noreply.github.com>2014-08-07 16:25:40 -0700
committerClaire McQuin <mcquin@users.noreply.github.com>2014-08-07 16:25:40 -0700
commit0c836a94b0e370ba2d69e67bde5af4aab569fe01 (patch)
treea20327485754b856f25d785de667063a5ff02d17 /spec/support/platform_helpers.rb
parent3e922c9536c362264694ee48a2094d758d81d19f (diff)
parente0575be762f17cad759aaa4cb1cb24e524304fa4 (diff)
downloadchef-0c836a94b0e370ba2d69e67bde5af4aab569fe01.tar.gz
Merge pull request #1591 from onddo/CHEF-5356-gcm-2
[CHEF-5356-gcm(2)] Encrypted data bags should use different HMAC key and include the IV in the HMAC
Diffstat (limited to 'spec/support/platform_helpers.rb')
-rw-r--r--spec/support/platform_helpers.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/platform_helpers.rb b/spec/support/platform_helpers.rb
index ad7104d170..a7c616d7a7 100644
--- a/spec/support/platform_helpers.rb
+++ b/spec/support/platform_helpers.rb
@@ -7,6 +7,10 @@ def ruby_gte_20?
RUBY_VERSION.to_f >= 2.0
end
+def ruby_lt_20?
+ !ruby_gte_20?
+end
+
def ruby_gte_19?
RUBY_VERSION.to_f >= 1.9
end
@@ -129,3 +133,11 @@ def root?
return false if windows?
Process.euid == 0
end
+
+def openssl_gte_101?
+ OpenSSL::OPENSSL_VERSION_NUMBER >= 10001000
+end
+
+def openssl_lt_101?
+ !openssl_gte_101?
+end