Remove OpenSSL Test (#3420)

* Remove OpenSSL Test
This commit is contained in:
abraunegg 2025-08-10 14:01:21 +10:00 committed by GitHub
commit 37ba8ccb8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 61 deletions

View file

@ -337,11 +337,6 @@ int main(string[] cliArgs) {
}
}
// OpenSSL Version Compatibility Test
// - Example - on CentOS 7.9 (OpenSSL 1.0.2k-fips 26 Jan 2017), access with Microsoft OneDrive causes a segfault in sha1_block_data_order_avx from /lib64/libcrypto.so.10
// - See Discussion #2950 for relevant gdb output
checkOpenSSLVersion();
// In a debug scenario, to assist with understanding the run-time configuration, ensure this flag is set
if (debugLogging) {
appConfig.setValueBool("display_running_config", true);

View file

@ -1752,62 +1752,6 @@ bool isBadCurlVersion(string curlVersion) {
return canFind(supportedVersions, curlVersion);
}
string getOpenSSLVersion() {
try {
// Execute 'openssl version' and capture the output
auto result = executeShell("openssl version");
// Strip any extraneous whitespace from the output
return result.output.strip();
} catch (Exception e) {
// Handle any exceptions, possibly returning an error message
return "Error fetching OpenSSL version: " ~ e.msg;
}
}
void checkOpenSSLVersion() {
// Get OpenSSL version string
auto versionString = getOpenSSLVersion();
if (versionString.startsWith("Error")) {
addLogEntry(versionString);
// Must force exit here, allow logging to be done
forceExit();
}
// Define regex to extract version parts
auto versionRegex = regex(r"OpenSSL\s(\d+)\.(\d+)\.(\d+)([a-z]?)");
auto matches = versionString.match(versionRegex);
if (matches.empty) {
if (!versionString.empty) {
if (debugLogging) {addLogEntry("Unable to parse provided OpenSSL version: " ~ versionString, ["debug"]);}
}
} else {
// Extract major, minor, patch, and optional letter parts
uint major = matches.captures[1].to!uint;
uint minor = matches.captures[2].to!uint;
uint patch = matches.captures[3].to!uint;
string letter = matches.captures[4]; // Empty if version is 3.x.x or higher
string distributionWarning = " Please report this to your distribution, requesting an update to a newer OpenSSL version, or consider upgrading it yourself for optimal stability.";
// Compare versions
if (major < 1 || (major == 1 && minor < 1) || (major == 1 && minor == 1 && patch < 1) ||
(major == 1 && minor == 1 && patch == 1 && (letter.empty || letter[0] < 'a'))) {
addLogEntry();
addLogEntry(format("WARNING: Your OpenSSL version (%d.%d.%d%s) is below the minimum required version of 1.1.1a. Significant operational issues are likely when using this client.", major, minor, patch, letter), ["info", "notify"]);
addLogEntry(distributionWarning);
addLogEntry();
} else if (major == 1 && minor == 1 && patch == 1 && !letter.empty && letter[0] >= 'a' && letter[0] <= 'w') {
addLogEntry();
addLogEntry(format("WARNING: Your OpenSSL version (%d.%d.%d%s) may cause stability issues with this client.", major, minor, patch, letter), ["info", "notify"]);
addLogEntry(distributionWarning);
addLogEntry();
} else if (major >= 3) {
// Do nothing for version >= 3.0.0
}
}
}
// Set the timestamp of the provided path to ensure this is done in a consistent manner
void setLocalPathTimestamp(bool dryRun, string inputPath, SysTime newTimeStamp) {