diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2022-03-23 20:13:06 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2022-03-23 20:13:06 -0700 |
commit | 22b416e6eabfa09118bbfc9753bcd2b1ba047e2c (patch) | |
tree | b9720a13796c1057d9a9c3750220e52ea1022d81 | |
parent | 79d69d23ea520f4389d5bcb0c38831bbc3aee150 (diff) | |
download | chef-22b416e6eabfa09118bbfc9753bcd2b1ba047e2c.tar.gz |
I blame my allergies
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.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 cdbffe36b7..8973ea248e 100644 --- a/lib/chef/http/ssl_policies.rb +++ b/lib/chef/http/ssl_policies.rb @@ -89,7 +89,7 @@ class Chef certs.each do |cert_file| cert = begin OpenSSL::X509::Certificate.new(::File.binread(cert_file)) - rescue OpenSSL::X509::CertificateError, OpenSSL::X509::StoreError => e + rescue OpenSSL::X509::CertificateError => e raise Chef::Exceptions::ConfigurationError, "Error reading cert file '#{cert_file}', original error '#{e.class}: #{e.message}'" end add_trusted_cert(cert) @@ -132,7 +132,7 @@ class Chef def add_trusted_cert(cert) http_client.cert_store.add_cert(cert) rescue OpenSSL::X509::StoreError => e - raise e unless e.message == "cert already in hash table" + raise e unless e.message ~= /cert already in hash table/ end end |