Skip to content

Commit

Permalink
feat: Vanilla/upstream OpenSSL in test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusdots committed Feb 11, 2025
1 parent 99bd40e commit ebe7b6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/facter/openssl_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
setcode do
if Facter::Util::Resolution.which('openssl')
openssl_version = Facter::Util::Resolution.exec('openssl version 2>&1')
matches = %r{^OpenSSL ([\w.]+)[ -]*(fips|FIPS)? +([\d.]+) +([\w.]+) +([\d.]+) *(\([\w:. ]+\))?}.match(openssl_version)
# OracleLinux did some uppercase-lowercase-extras
matches = %r{^OpenSSL ([\w.]+)[ -]*(fips|FIPS|dev)? +([\d.]+) +([\w.]+) +([\d.]+) *(\([\w:. ]+\))?}.match(openssl_version)
matches[1] if matches
end
end
Expand Down
4 changes: 4 additions & 0 deletions spec/unit/openssl_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
return_string: 'OpenSSL 1.0.2g 1 Mar 2016',
version_string: '1.0.2g',
},
'vanilla-openssl' => {
return_string: 'OpenSSL 3.5.0-dev (Library: OpenSSL 3.5.0-dev )',
version_string: '3.5.0-dev',
},
'legacy' => {
return_string: 'OpenSSL 0.9.8zg 14 July 2015',
version_string: '0.9.8zg',
Expand Down

0 comments on commit ebe7b6a

Please sign in to comment.