diff options
Diffstat (limited to 'chef-config/lib/chef-config/config.rb')
-rw-r--r-- | chef-config/lib/chef-config/config.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb index 58b60e5295..7451f744a7 100644 --- a/chef-config/lib/chef-config/config.rb +++ b/chef-config/lib/chef-config/config.rb @@ -1258,9 +1258,9 @@ module ChefConfig # @api private def self.enable_fips_mode OpenSSL.fips_mode = true - require "digest" - require "digest/sha1" - require "digest/md5" + require "digest" unless defined?(Digest) + require "digest/sha1" unless defined?(Digest::SHA1) + 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") |