summaryrefslogtreecommitdiff
path: root/jstests/ssl
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2020-05-05 15:49:22 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-06 16:24:08 +0000
commit6c48bf112c70ea4de661b0025e8525f992a88383 (patch)
tree909b33dadc8676dd05b8f9066f68246481da78a3 /jstests/ssl
parentdcc42b3db40ecc1cb3ca278d9dcc2208a6c7734a (diff)
downloadmongo-6c48bf112c70ea4de661b0025e8525f992a88383.tar.gz
SERVER-47929 Update TLS protocol negotiation tests for Ubuntu 20.04
Diffstat (limited to 'jstests/ssl')
-rw-r--r--jstests/ssl/libs/ssl_helpers.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/jstests/ssl/libs/ssl_helpers.js b/jstests/ssl/libs/ssl_helpers.js
index 969a812c8ed..6e1c9756420 100644
--- a/jstests/ssl/libs/ssl_helpers.js
+++ b/jstests/ssl/libs/ssl_helpers.js
@@ -304,6 +304,21 @@ function isRHEL8() {
return false;
}
+function isUbuntu2004() {
+ if (_isWindows()) {
+ return false;
+ }
+
+ // Ubuntu 20.04 disables TLS 1.0 and TLS 1.1 as part their default crypto policy
+ // We skip tests on Ubuntu 20.04 that require these versions as a result.
+ const grep_result = runProgram('grep', 'focal', '/etc/os-release');
+ if (grep_result == 0) {
+ return true;
+ }
+
+ return false;
+}
+
function isDebian10() {
if (_isWindows()) {
return false;
@@ -331,7 +346,7 @@ function sslProviderSupportsTLS1_0() {
const cryptoPolicy = cat("/etc/crypto-policies/config");
return cryptoPolicy.includes("LEGACY");
}
- return !isDebian10();
+ return !isDebian10() && !isUbuntu2004();
}
function sslProviderSupportsTLS1_1() {
@@ -339,7 +354,7 @@ function sslProviderSupportsTLS1_1() {
const cryptoPolicy = cat("/etc/crypto-policies/config");
return cryptoPolicy.includes("LEGACY");
}
- return !isDebian10();
+ return !isDebian10() && !isUbuntu2004();
}
function opensslVersionAsInt() {