summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2016-02-25 15:11:37 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2016-02-25 15:11:37 -0800
commit6e88c0b22fb5ef7873d73e255af98ad6a3bf40be (patch)
tree603fd5dd4a672edf8c90c8f7e6660cfec6ea7f74
parent3dddc4fd6286c9c5cf7477a425c98b811f93f67a (diff)
downloadchef-6e88c0b22fb5ef7873d73e255af98ad6a3bf40be.tar.gz
Only undefine things that are defined
-rw-r--r--lib/chef/mixin/fips.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/mixin/fips.rb b/lib/chef/mixin/fips.rb
index 54ae526867..0242eb7ae8 100644
--- a/lib/chef/mixin/fips.rb
+++ b/lib/chef/mixin/fips.rb
@@ -44,8 +44,8 @@ class Chef
# @api private
def disallow_md5
- Digest.send(:remove_const, "MD5")
- OpenSSL::Digest.send(:remove_const, "MD5")
+ Digest.send(:remove_const, "MD5") if defined?(Digest::MD5)
+ OpenSSL::Digest.send(:remove_const, "MD5") if defined?(OpenSSL::Digest::MD5)
end
end
end