Openssl version matcher accounts for vanilla and os pecularities#248
Open
marcusdots wants to merge 3 commits into
Open
Openssl version matcher accounts for vanilla and os pecularities#248marcusdots wants to merge 3 commits into
marcusdots wants to merge 3 commits into
Conversation
bastelfreak
reviewed
Feb 11, 2025
| 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) |
Member
There was a problem hiding this comment.
I'm not convinced yet that such a complicated regex is still required.
Facter::Util::Resolution.exec('openssl version 2>&1').split(' ')[1]There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request (PR) description
This Pull Request (PR) fixes the following issues