Skip to content

Commit 30e98c1

Browse files
committed
add control for CRYPTO_POLICY on RedHat
RedHat introduces a CRYPTO_POLICY in RHEL8. This needs to be configured separately, or it will override sshd_config settings for Cipher, MAC and Kex. see: https://access.redhat.com/solutions/4410591 Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
1 parent 23bc5fb commit 30e98c1

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

controls/sshd_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,3 +503,17 @@
503503
its('stderr') { should eq '' }
504504
end
505505
end
506+
507+
control 'sshd-49' do
508+
impact 1.0
509+
title 'Server: CRYPTO_POLICY'
510+
desc 'Verifies, that we are not running CRYPTO_POLICY and our settings from sshd_config are effective'
511+
if os[:family] == "redhat" && ::Gem::Version.new(os.release) > ::Gem::Version.new('8')
512+
describe bash("pgrep -af 'sshd -D'") do
513+
its('exit_status') { should eq 0 }
514+
its('stdout') { should_not match('-oCiphers') }
515+
its('stdout') { should_not match('-oKexAlgorithms') }
516+
its('stdout') { should_not match('-oHostKeyAlgorithms') }
517+
end
518+
end
519+
end

0 commit comments

Comments
 (0)