summaryrefslogtreecommitdiff
path: root/chef-config
diff options
context:
space:
mode:
Diffstat (limited to 'chef-config')
-rw-r--r--chef-config/lib/chef-config/config.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index 3eb8c8475c..9b5f5a849a 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -1287,10 +1287,10 @@ module ChefConfig
require "digest/md5" unless defined?(Digest::MD5)
# Remove pre-existing constants if they do exist to reduce the
# amount of log spam and warnings.
- Digest.send(:remove_const, "SHA1") if Digest.const_defined?("SHA1")
- Digest.const_set("SHA1", OpenSSL::Digest::SHA1)
- OpenSSL::Digest.send(:remove_const, "MD5") if OpenSSL::Digest.const_defined?("MD5")
- OpenSSL::Digest.const_set("MD5", Digest::MD5)
+ Digest.send(:remove_const, "SHA1") if Digest.const_defined?(:SHA1)
+ Digest.const_set(:SHA1, OpenSSL::Digest::SHA1)
+ OpenSSL::Digest.send(:remove_const, "MD5") if OpenSSL::Digest.const_defined?(:MD5)
+ OpenSSL::Digest.const_set(:MD5, Digest::MD5)
ChefConfig.logger.debug "FIPS mode is enabled."
end
end