Open hunter86bg opened 2 years ago
So far my workaround (should work on RHEL/SLES) is:
require 'tempfile'
temp_cert_file = Tempfile.new('csv', '/etc/chef/')
Dir.glob(['/etc/ssl/certs/*.crt', '/etc/ssl/certs/*.pem', '/etc/chef/trusted_certs/*']).each do |ca_cert|
IO.copy_stream(ca_cert, temp_cert_file)
end
ENV['SSL_CERT_FILE'] = temp_cert_file.path
require 'vault'
Vault.ssl_ca_cert = '/etc/ssl/certs/ca-certificates.crt'
ssl_ca_cert seems to be working fine with multiple certs
@jackivanov, in Chef you can have multiple files in a directory. Is there a way to point to a directory instead of a file ?
@hunter86bg yes, there's ssl_ca_path
I am trying to pass multiple CA certificates to ssl_pem_contents as I never know which CA will sign the vault's certificate. Yet, I receive:
How can I make this one work?