You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main.d
-5Lines changed: 0 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -337,11 +337,6 @@ int main(string[] cliArgs) {
337
337
}
338
338
}
339
339
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
-
345
340
// In a debug scenario, to assist with understanding the run-time configuration, ensure this flag is set
// 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
-
voidcheckOpenSSLVersion() {
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) ||
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(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
-
} elseif (major >=3) {
1806
-
// Do nothing for version >= 3.0.0
1807
-
}
1808
-
}
1809
-
}
1810
-
1811
1755
// Set the timestamp of the provided path to ensure this is done in a consistent manner
0 commit comments