Skip to content

Commit 37ba8cc

Browse files
authored
Remove OpenSSL Test (#3420)
* Remove OpenSSL Test
1 parent 52894d0 commit 37ba8cc

File tree

2 files changed

+0
-61
lines changed

2 files changed

+0
-61
lines changed

src/main.d

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,6 @@ int main(string[] cliArgs) {
337337
}
338338
}
339339

340-
// OpenSSL Version Compatibility Test
341-
// - 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
342-
// - See Discussion #2950 for relevant gdb output
343-
checkOpenSSLVersion();
344-
345340
// In a debug scenario, to assist with understanding the run-time configuration, ensure this flag is set
346341
if (debugLogging) {
347342
appConfig.setValueBool("display_running_config", true);

src/util.d

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,62 +1752,6 @@ bool isBadCurlVersion(string curlVersion) {
17521752
return canFind(supportedVersions, curlVersion);
17531753
}
17541754

1755-
string getOpenSSLVersion() {
1756-
try {
1757-
// Execute 'openssl version' and capture the output
1758-
auto result = executeShell("openssl version");
1759-
1760-
// Strip any extraneous whitespace from the output
1761-
return result.output.strip();
1762-
} catch (Exception e) {
1763-
// Handle any exceptions, possibly returning an error message
1764-
return "Error fetching OpenSSL version: " ~ e.msg;
1765-
}
1766-
}
1767-
1768-
void checkOpenSSLVersion() {
1769-
// Get OpenSSL version string
1770-
auto versionString = getOpenSSLVersion();
1771-
if (versionString.startsWith("Error")) {
1772-
addLogEntry(versionString);
1773-
// Must force exit here, allow logging to be done
1774-
forceExit();
1775-
}
1776-
1777-
// Define regex to extract version parts
1778-
auto versionRegex = regex(r"OpenSSL\s(\d+)\.(\d+)\.(\d+)([a-z]?)");
1779-
1780-
auto matches = versionString.match(versionRegex);
1781-
if (matches.empty) {
1782-
if (!versionString.empty) {
1783-
if (debugLogging) {addLogEntry("Unable to parse provided OpenSSL version: " ~ versionString, ["debug"]);}
1784-
}
1785-
} else {
1786-
// Extract major, minor, patch, and optional letter parts
1787-
uint major = matches.captures[1].to!uint;
1788-
uint minor = matches.captures[2].to!uint;
1789-
uint patch = matches.captures[3].to!uint;
1790-
string letter = matches.captures[4]; // Empty if version is 3.x.x or higher
1791-
string distributionWarning = " Please report this to your distribution, requesting an update to a newer OpenSSL version, or consider upgrading it yourself for optimal stability.";
1792-
1793-
// Compare versions
1794-
if (major < 1 || (major == 1 && minor < 1) || (major == 1 && minor == 1 && patch < 1) ||
1795-
(major == 1 && minor == 1 && patch == 1 && (letter.empty || letter[0] < 'a'))) {
1796-
addLogEntry();
1797-
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"]);
1798-
addLogEntry(distributionWarning);
1799-
addLogEntry();
1800-
} else if (major == 1 && minor == 1 && patch == 1 && !letter.empty && letter[0] >= 'a' && letter[0] <= 'w') {
1801-
addLogEntry();
1802-
addLogEntry(format("WARNING: Your OpenSSL version (%d.%d.%d%s) may cause stability issues with this client.", major, minor, patch, letter), ["info", "notify"]);
1803-
addLogEntry(distributionWarning);
1804-
addLogEntry();
1805-
} else if (major >= 3) {
1806-
// Do nothing for version >= 3.0.0
1807-
}
1808-
}
1809-
}
1810-
18111755
// Set the timestamp of the provided path to ensure this is done in a consistent manner
18121756
void setLocalPathTimestamp(bool dryRun, string inputPath, SysTime newTimeStamp) {
18131757

0 commit comments

Comments
 (0)