Project

General

Profile

« Previous | Next » 

Revision 931b6fcd

Added by Joniel Pasqualetto about 2 months ago

Fixes #37063 - Add feature in katello-certs-check to verify if CA bundle has any certificates with trust rules

- Add feature to verify if provided CA bundle has certificates with trust rules
- Add test case for the new feature
- Fix indentation on function check-ca-bundle-size

View differences:

spec/katello_certs_check_spec.rb
expect(status.exitstatus).to eq 1
end
end
context 'with bundle containing trust rules' do
let(:key) { File.join(certs_directory, 'foreman.example.com.key') }
let(:cert) { File.join(certs_directory, 'foreman.example.com.crt') }
let(:ca) { File.join(certs_directory, 'ca-bundle-with-trust-rules.crt') }
it 'fails on bundle validation' do
command_with_certs = "#{command} -b #{ca} -k #{key} -c #{cert}"
_stdout, stderr, status = Open3.capture3(command_with_certs)
expect(stderr).to include 'The CA bundle contains 1 certificate(s) with trust rules. This may create problems for older systems to trust the bundle. Please, recreate the bundle using certificates without trust rules'
expect(status.exitstatus).to eq 10
end
end
end

Also available in: Unified diff