Skip to content

Commit

Permalink
Merge pull request dev-sec#270 from foonix/rhel6-sha2-hmacs
Browse files Browse the repository at this point in the history
Use sha2 HMACs on RHEL 6 / CentOS 6.
  • Loading branch information
rndmh3ro authored Apr 13, 2020
2 parents 26676a2 + fc854b4 commit ac9fd3a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ ssh_macs_53_default:
- hmac-ripemd160
- hmac-sha1

ssh_macs_53_el_6_5_default:
- hmac-sha2-512
- hmac-sha2-256

ssh_macs_59_default:
- hmac-sha2-512
- hmac-sha2-256
Expand Down
8 changes: 8 additions & 0 deletions tasks/crypto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
ssh_macs: '{{ ssh_macs_59_default }}'
when: sshd_version is version('5.9', '>=') and not ssh_macs

- name: set macs for Enterprise Linux >= 6.5 (openssh 5.3 with backports)
set_fact:
ssh_macs: '{{ ssh_macs_53_el_6_5_default }}'
when:
- ansible_distribution in ['CentOS', 'OracleLinux', 'RedHat']
- ansible_distribution_version is version('6.5', '>=')
- not ssh_macs

- name: set macs according to openssh-version
set_fact:
ssh_macs: '{{ ssh_macs_53_default }}'
Expand Down

0 comments on commit ac9fd3a

Please sign in to comment.