Skip to content

Openssl version matcher accounts for vanilla and os pecularities#248

Open
marcusdots wants to merge 3 commits into
voxpupuli:masterfrom
marcusdots:openssl_version
Open

Openssl version matcher accounts for vanilla and os pecularities#248
marcusdots wants to merge 3 commits into
voxpupuli:masterfrom
marcusdots:openssl_version

Conversation

@marcusdots

Copy link
Copy Markdown
Contributor

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

openssl_version = Facter::Util::Resolution.exec('openssl version 2>&1')
matches = %r{^OpenSSL ([\w.-]+)(\s+FIPS)?( +)([\d.]+)( +)([\w.]+)( +)([\d.]+)}.match(openssl_version)
# OracleLinux did some uppercase-lowercase-extras
matches = %r{^OpenSSL ([\w.]+)[ -]*(fips|FIPS|dev)? +([\d.]+) +([\w.]+) +([\d.]+) *(\([\w:. ]+\))?}.match(openssl_version)

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.

I'm not convinced yet that such a complicated regex is still required.

Facter::Util::Resolution.exec('openssl version 2>&1').split(' ')[1]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Since the revision character has been included in the version for a while, that might be ok. However, doing so would miss the fips information. For example, OpenSSL 1.1.1k FIPS and OpenSSL 1.0.2k-fips. As I said in my PR, As an aside, it seems like we could be adding another fact based on FIPS mode, and possibly the library information for v3, but that is best left to another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants