diff options
author | Tim Smith <tsmith@chef.io> | 2018-11-24 14:11:04 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-11-24 18:37:47 -0800 |
commit | c5e79b21b2ef781428ecaddb336940890cac5e29 (patch) | |
tree | 9b16eb4a5c6bb616d0161ed1015bd19bbc95fce0 | |
parent | 1aae57fdfcc3dae343d5186513291aea895b21c2 (diff) | |
download | ohai-c5e79b21b2ef781428ecaddb336940890cac5e29.tar.gz |
Remove unnecessary Ruby 2.4 FIPS detectionnew_ruby
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/ohai/plugins/linux/fips.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/ohai/plugins/linux/fips.rb b/lib/ohai/plugins/linux/fips.rb index 17c183e2..70d5e142 100644 --- a/lib/ohai/plugins/linux/fips.rb +++ b/lib/ohai/plugins/linux/fips.rb @@ -1,6 +1,6 @@ # # Author:: Matt Wrock (<matt@mattwrock.com>) -# Copyright:: Copyright (c) 2016 Chef Software, Inc. +# Copyright:: Copyright (c) 2016-2018 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -28,18 +28,11 @@ Ohai.plugin(:Fips) do collect_data(:linux) do fips Mash.new - # Check for new fips_mode method added in Ruby 2.5. After we drop support - # for Ruby 2.4, clean up everything after this and collapse the FIPS plugins. require "openssl" if defined?(OpenSSL.fips_mode) && OpenSSL.fips_mode && !$FIPS_TEST_MODE fips["kernel"] = { "enabled" => true } else - begin - enabled = File.read("/proc/sys/crypto/fips_enabled").chomp - fips["kernel"] = { "enabled" => enabled == "0" ? false : true } - rescue Errno::ENOENT - fips["kernel"] = { "enabled" => false } - end + fips["kernel"] = { "enabled" => false } end end end |