summaryrefslogtreecommitdiff
path: root/lib/chef/util/fips.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/util/fips.rb')
-rw-r--r--lib/chef/util/fips.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/chef/util/fips.rb b/lib/chef/util/fips.rb
new file mode 100644
index 0000000000..630fb49db8
--- /dev/null
+++ b/lib/chef/util/fips.rb
@@ -0,0 +1,17 @@
+require 'openssl'
+class Chef
+ class Util
+ class FIPS
+ def self.disable(&block)
+ if Chef::Config.fips_mode
+ OpenSSL.fips_mode = false
+ val = block.call
+ OpenSSL.fips_mode = true
+ val
+ else
+ block.call
+ end
+ end
+ end
+ end
+end