diff options
author | Tim Smith <tsmith@chef.io> | 2018-11-24 14:11:04 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-11-24 14:11:04 -0800 |
commit | 6f02a8bd1bf955019a399797e5f016bcb390c116 (patch) | |
tree | d3683909595bb6f4e6cc40771f5ffafb93e1e782 | |
parent | a946ff969ae335b163a1766901ccd960ad6dc4eb (diff) | |
download | ohai-6f02a8bd1bf955019a399797e5f016bcb390c116.tar.gz |
Remove unnecessary Ruby 2.4 FIPS detection
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 |