-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(wip) add flag and config to force insecure requests
- Loading branch information
Showing
7 changed files
with
56 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
module CoverageReporter | ||
class OpenSSLVersion | ||
WORKS = SemanticVersion.new(1, 1, 0) | ||
|
||
def can_fail? | ||
return current.not_nil! < WORKS unless current.nil? | ||
|
||
false | ||
end | ||
|
||
private def current | ||
matches = /.*?(\d+)\.(\d+)\.(\d+).*/.match(current_string) | ||
return nil if matches.nil? | ||
|
||
major = matches[1].to_i | ||
minor = matches[2].to_i | ||
patch = matches[3].to_i | ||
SemanticVersion.new(major, minor, patch) | ||
end | ||
|
||
# TODO: rescue from unknown command | ||
# TODO: return nil for windows | ||
private def current_string | ||
# examples: | ||
# OpenSSL 1.0.2k-fips 26 Jan 2017 | ||
# OpenSSL 3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023) | ||
`openssl version -v` | ||
end | ||
end | ||
end |
This file contains 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