lib/berkshelf/ssl_policies.rb in berkshelf-6.2.2 vs lib/berkshelf/ssl_policies.rb in berkshelf-6.3.0
- old
+ new
@@ -29,12 +29,14 @@
config_dir
end
end
def set_custom_certs
- ::Dir.glob("#{trusted_certs_dir}/" "{*.crt,*.pem}").each do |cert|
- cert = OpenSSL::X509::Certificate.new(IO.read(cert))
- add_trusted_cert(cert)
+ Dir.chdir(trusted_certs_dir) do
+ ::Dir.glob("{*.crt,*.pem}").each do |cert|
+ cert = OpenSSL::X509::Certificate.new(IO.read(cert))
+ add_trusted_cert(cert)
+ end
end
end
end
end