summaryrefslogtreecommitdiff
path: root/jstests/ssl/libs/ssl_helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/ssl/libs/ssl_helpers.js')
-rw-r--r--jstests/ssl/libs/ssl_helpers.js46
1 files changed, 4 insertions, 42 deletions
diff --git a/jstests/ssl/libs/ssl_helpers.js b/jstests/ssl/libs/ssl_helpers.js
index c03e38a1778..3401e86dd9e 100644
--- a/jstests/ssl/libs/ssl_helpers.js
+++ b/jstests/ssl/libs/ssl_helpers.js
@@ -1,5 +1,4 @@
load('jstests/multiVersion/libs/multi_rs.js');
-load('jstests/libs/os_helpers.js');
// Do not fail if this test leaves unterminated processes because this file expects replset1.js to
// throw for invalid SSL options.
@@ -288,7 +287,6 @@ function detectDefaultTLSProtocol() {
useLogFiles: true,
tlsLogVersions: "TLS1_0,TLS1_1,TLS1_2,TLS1_3",
waitForConnect: true,
- tlsCAFile: CA_CERT
});
assert.eq(0,
@@ -297,9 +295,9 @@ function detectDefaultTLSProtocol() {
'--port',
conn.port,
'--sslPEMKeyFile',
- CLIENT_CERT,
+ 'jstests/libs/client.pem',
'--sslCAFile',
- CA_CERT,
+ 'jstests/libs/ca.pem',
'--eval',
';'));
@@ -410,12 +408,7 @@ function sslProviderSupportsTLS1_0() {
const cryptoPolicy = cat("/etc/crypto-policies/config");
return cryptoPolicy.includes("LEGACY");
}
-
- if (isOpenSSL3orGreater()) {
- return false;
- }
-
- return !isDebian() && !isUbuntu2004();
+ return !isDebian10() && !isUbuntu2004();
}
function sslProviderSupportsTLS1_1() {
@@ -423,22 +416,7 @@ function sslProviderSupportsTLS1_1() {
const cryptoPolicy = cat("/etc/crypto-policies/config");
return cryptoPolicy.includes("LEGACY");
}
-
- if (isOpenSSL3orGreater()) {
- return false;
- }
-
- return !isDebian() && !isUbuntu2004();
-}
-
-function isOpenSSL3orGreater() {
- // Windows and macOS do not have "openssl.compiled" in buildInfo but they do have "running"
- const opensslCompiledIn = getBuildInfo().openssl.compiled !== undefined;
- if (!opensslCompiledIn) {
- return false;
- }
-
- return opensslVersionAsInt() >= 0x3000000;
+ return !isDebian10() && !isUbuntu2004();
}
function opensslVersionAsInt() {
@@ -455,22 +433,6 @@ function opensslVersionAsInt() {
return version;
}
-function supportsFIPS() {
- // OpenSSL supports FIPS
- let expectSupportsFIPS = (determineSSLProvider() == "openssl");
-
- // But OpenSSL supports FIPS only sometimes
- // - Debian does not support FIPS, Fedora 37 does not, Fedora 38 does
- // - Ubuntu only supports FIPS with Ubuntu pro
- if (expectSupportsFIPS) {
- if (isDebian() || isUbuntu()) {
- expectSupportsFIPS = false;
- }
- }
-
- return expectSupportsFIPS;
-}
-
function copyCertificateFile(a, b) {
if (_isWindows()) {
// correctly replace forward slashes for Windows