summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKartik Null Cating-Subramanian <ksubramanian@chef.io>2016-04-25 17:31:07 -0400
committerKartik Null Cating-Subramanian <ksubramanian@chef.io>2016-04-25 17:31:07 -0400
commitfa2a9b0a2b8468ad099a08213638971070309a7e (patch)
tree6377d4a929e9698a808c1dde81f997eb006c7c45
parent63dd9afb7aee3c7d1aa61a036e313c4d74f683fe (diff)
downloadchef-ksubrama/fips_acceptance.tar.gz
-rw-r--r--chef-config/lib/chef-config/config.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index 69333aa198..e6192c22cb 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -960,6 +960,8 @@ module ChefConfig
require "digest"
require "digest/sha1"
require "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")