diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-12-16 17:31:23 -0800 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-12-16 17:31:23 -0800 |
commit | c675639d5651e9a8fdaddaddc0846d77133d4f24 (patch) | |
tree | 66325c6e675ccd56d8462e0722304ed76cdf254d | |
parent | ca500b211a287e07d2de6253c9bc99dd7b9926f4 (diff) | |
download | chef-c675639d5651e9a8fdaddaddc0846d77133d4f24.tar.gz |
Use namespaced File constant consistently.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r-- | lib/chef/http/ssl_policies.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/http/ssl_policies.rb b/lib/chef/http/ssl_policies.rb index 03d9ff5ef1..3a02dbe283 100644 --- a/lib/chef/http/ssl_policies.rb +++ b/lib/chef/http/ssl_policies.rb @@ -85,10 +85,10 @@ class Chef http_client.cert_store.set_default_paths end if config.trusted_certs_dir - certs = Dir.glob(File.join(Chef::Util::PathHelper.escape_glob_dir(config.trusted_certs_dir), "*.{crt,pem}")) + certs = Dir.glob(::File.join(Chef::Util::PathHelper.escape_glob_dir(config.trusted_certs_dir), "*.{crt,pem}")) certs.each do |cert_file| cert = begin - OpenSSL::X509::Certificate.new(File.binread(cert_file)) + OpenSSL::X509::Certificate.new(::File.binread(cert_file)) rescue OpenSSL::X509::CertificateError => e raise Chef::Exceptions::ConfigurationError, "Error reading cert file '#{cert_file}', original error '#{e.class}: #{e.message}'" end |