diff --git a/jstests/ssl/libs/ssl_helpers.js b/jstests/ssl/libs/ssl_helpers.js index bfbff595c2f..1e97868b340 100644 --- a/jstests/ssl/libs/ssl_helpers.js +++ b/jstests/ssl/libs/ssl_helpers.js @@ -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(); }