Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libraries/ssh_crypto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def valid_ciphers # rubocop:disable Metrics/CyclomaticComplexity, Metrics/Method
when /7\./
ciphers = ciphers66
end
when 'fedora'
when 'amazon', 'fedora'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@woneill thanks for your PR! Sure its fedoraand not redhat?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is in the redhat family but since it uses a newer kernel and packages than redhat 6 I figured it'd be more accurate to have it use the fedora case matchers.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@woneill does the check for inspec.os[:release]not cover the newer kernel/packages? I always thought that current amazon linux is based on RHEL 7, is it not the case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a weird mix of RHEL 6 and 7 features. For instance, the package versions appear to be similar to RHEL 7 releases but it doesn't use systemd. Also inspec.os[:release] returns a date-like value such as 2017.09.

== Operating System Details

Name:      amazon
Family:    redhat
Release:   2017.09
Arch:      x86_64

Copy link
Copy Markdown
Member

@artem-sidorenko artem-sidorenko Jan 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@woneill sounds reasonable, thanks for explaining it!

ciphers = ciphers66
when 'opensuse'
case inspec.os[:release]
Expand Down Expand Up @@ -100,7 +100,7 @@ def valid_kexs # rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLen
when /7\./
kex = kex66
end
when 'fedora'
when 'amazon', 'fedora'
kex = kex66
when 'opensuse'
case inspec.os[:release]
Expand Down Expand Up @@ -153,7 +153,7 @@ def valid_macs # rubocop:disable Metrics/CyclomaticComplexity, Metrics/MethodLen
when /7\./
macs = macs66
end
when 'fedora'
when 'amazon', 'fedora'
macs = macs66
when 'opensuse'
case inspec.os[:release]
Expand Down Expand Up @@ -231,7 +231,7 @@ def valid_algorithms # rubocop:disable Metrics/CyclomaticComplexity, Metrics/Met
when /7\./
alg = alg66
end
when 'fedora'
when 'amazon', 'fedora'
alg = alg66
when 'opensuse'
case inspec.os[:release]
Expand Down