0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00

SERVER-44620 Fix sslProviderSupports helpers on Debian 10

This commit is contained in:
Adam Cooper 2019-12-02 16:23:50 +00:00 committed by evergreen
parent 1f453b97b2
commit b8837818ae

View File

@ -274,13 +274,28 @@ function isRHEL8() {
return false;
}
function isDebian10() {
if (_isWindows()) {
return false;
}
// Debian 10 disables TLS 1.0 and TLS 1.1 as part their default crypto policy
// We skip tests on Debian 10 that require these versions as a result.
try {
// on non-debian systems, cat will throw here (file doesn't exist)
const debianVersion = cat("/etc/debian_version").toLowerCase();
return debianVersion.includes("10") || debianVersion.includes("buster");
} catch (e) {
return false;
}
}
function sslProviderSupportsTLS1_0() {
if (isRHEL8()) {
const cryptoPolicy = cat("/etc/crypto-policies/config");
return cryptoPolicy.includes("LEGACY");
}
return true;
return !isDebian10();
}
function sslProviderSupportsTLS1_1() {
@ -288,6 +303,5 @@ function sslProviderSupportsTLS1_1() {
const cryptoPolicy = cat("/etc/crypto-policies/config");
return cryptoPolicy.includes("LEGACY");
}
return true;
return !isDebian10();
}