diff options
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/ssl/replset1.js | 14 | ||||
-rw-r--r-- | jstests/ssl/sharding_with_x509.js | 2 | ||||
-rw-r--r-- | jstests/ssl/ssl_cert_password.js | 2 | ||||
-rw-r--r-- | jstests/ssl/ssl_crl.js | 4 | ||||
-rw-r--r-- | jstests/ssl/ssl_crl_revoked.js | 2 | ||||
-rw-r--r-- | jstests/ssl/ssl_fips.js | 2 | ||||
-rw-r--r-- | jstests/ssl/ssl_hostname_validation.js | 6 | ||||
-rw-r--r-- | jstests/ssl/ssl_weak.js | 4 | ||||
-rw-r--r-- | jstests/ssl/x509_client.js | 4 | ||||
-rw-r--r-- | jstests/sslSpecial/ssl_mixedmode.js | 18 | ||||
-rw-r--r-- | jstests/sslSpecial/ssl_mixedmode2.js | 6 |
11 files changed, 32 insertions, 32 deletions
diff --git a/jstests/ssl/replset1.js b/jstests/ssl/replset1.js index 689bc02d071..3b11710b6ab 100644 --- a/jstests/ssl/replset1.js +++ b/jstests/ssl/replset1.js @@ -2,30 +2,30 @@ // since it is not necessary for this test. TestData.useX509 = false; -ssl_options1 = {sslMode : "sslOnly", +ssl_options1 = {sslMode : "requireSSL", sslPEMKeyFile : "jstests/libs/server.pem", sslCAFile: "jstests/libs/ca.pem", sslAllowInvalidCertificates: ""}; ssl_options2 = ssl_options1; load("jstests/replsets/replset1.js"); -// Test mixed sslMode acceptSSL/sendAcceptSSL -ssl_options1 = {sslMode : "acceptSSL", +// Test mixed sslMode allowSSL/preferSSL +ssl_options1 = {sslMode : "allowSSL", sslPEMKeyFile : "jstests/libs/server.pem", sslCAFile: "jstests/libs/ca.pem", sslAllowInvalidCertificates: ""}; -ssl_options2 = {sslMode : "sendAcceptSSL", +ssl_options2 = {sslMode : "preferSSL", sslPEMKeyFile : "jstests/libs/server.pem", sslCAFile: "jstests/libs/ca.pem", sslAllowInvalidCertificates: ""}; load("jstests/replsets/replset1.js"); -// Test mixed sslMode sendAcceptSSL/sslOnly -ssl_options1 = {sslMode : "sendAcceptSSL", +// Test mixed sslMode preferSSL/requireSSL +ssl_options1 = {sslMode : "preferSSL", sslPEMKeyFile : "jstests/libs/server.pem", sslCAFile: "jstests/libs/ca.pem", sslAllowInvalidCertificates: ""}; -ssl_options2 = {sslMode : "sslOnly", +ssl_options2 = {sslMode : "requireSSL", sslPEMKeyFile : "jstests/libs/server.pem", sslCAFile: "jstests/libs/ca.pem", sslAllowInvalidCertificates: ""}; diff --git a/jstests/ssl/sharding_with_x509.js b/jstests/ssl/sharding_with_x509.js index 37741513dbf..ca6fdd5923d 100644 --- a/jstests/ssl/sharding_with_x509.js +++ b/jstests/ssl/sharding_with_x509.js @@ -1,7 +1,7 @@ // Tests basic sharding with x509 cluster auth // The purpose is to verify the connectivity between mongos and the shards -var x509_options = {sslMode : "sslOnly", +var x509_options = {sslMode : "requireSSL", sslPEMKeyFile : "jstests/libs/server.pem", sslCAFile: "jstests/libs/ca.pem", sslClusterFile: "jstests/libs/cluster-cert.pem", diff --git a/jstests/ssl/ssl_cert_password.js b/jstests/ssl/ssl_cert_password.js index 5b3376db53f..6fd1a0efc19 100644 --- a/jstests/ssl/ssl_cert_password.js +++ b/jstests/ssl/ssl_cert_password.js @@ -13,7 +13,7 @@ mkdir(external_scratch_dir); md = startMongod("--nopreallocj", "--port", port, "--dbpath", dbpath, - "--sslMode","sslOnly", + "--sslMode","requireSSL", "--sslPEMKeyFile", "jstests/libs/password_protected.pem", "--sslPEMKeyPassword", "qwerty"); // startMongod connects a Mongo shell, so if we get here, the test is successful. diff --git a/jstests/ssl/ssl_crl.js b/jstests/ssl/ssl_crl.js index 75a5e0e6c4c..0500a73ecbc 100644 --- a/jstests/ssl/ssl_crl.js +++ b/jstests/ssl/ssl_crl.js @@ -12,7 +12,7 @@ var baseName = "jstests_ssl_ssl_crl"; var md = startMongod("--port", port1, "--dbpath", MongoRunner.dataPath + baseName + "1", - "--sslMode", "sslOnly", + "--sslMode", "requireSSL", "--sslPEMKeyFile", "jstests/libs/server.pem", "--sslCAFile", "jstests/libs/ca.pem", "--sslCRLFile", "jstests/libs/crl.pem"); @@ -28,7 +28,7 @@ assert(mongo==0); port2 = ports[1]; // This test ensures clients cannot connect if the CRL is expired. md = startMongod("--port", port2, "--dbpath", MongoRunner.dataPath + baseName + "2", - "--sslMode", "sslOnly", + "--sslMode", "requireSSL", "--sslPEMKeyFile", "jstests/libs/server.pem", "--sslCAFile", "jstests/libs/ca.pem", "--sslCRLFile", "jstests/libs/crl_expired.pem"); diff --git a/jstests/ssl/ssl_crl_revoked.js b/jstests/ssl/ssl_crl_revoked.js index 190624d26e1..b8753e013b8 100644 --- a/jstests/ssl/ssl_crl_revoked.js +++ b/jstests/ssl/ssl_crl_revoked.js @@ -7,7 +7,7 @@ var baseName = "jstests_ssl_ssl_crl_revoked"; var md = startMongod( "--port", port, "--dbpath", MongoRunner.dataPath + baseName, - "--sslMode","sslOnly", + "--sslMode","requireSSL", "--sslPEMKeyFile", "jstests/libs/server.pem", "--sslCAFile", "jstests/libs/ca.pem", "--sslCRLFile", "jstests/libs/crl_client_revoked.pem"); diff --git a/jstests/ssl/ssl_fips.js b/jstests/ssl/ssl_fips.js index 76ec9eaf4d0..6259ce1dbec 100644 --- a/jstests/ssl/ssl_fips.js +++ b/jstests/ssl/ssl_fips.js @@ -5,7 +5,7 @@ var baseName = "jstests_ssl_ssl_fips"; var md = startMongod("--port", port1, "--dbpath", - MongoRunner.dataPath + baseName, "--sslMode", "sslOnly", + MongoRunner.dataPath + baseName, "--sslMode", "requireSSL", "--sslPEMKeyFile", "jstests/libs/server.pem", "--sslFIPSMode"); diff --git a/jstests/ssl/ssl_hostname_validation.js b/jstests/ssl/ssl_hostname_validation.js index ee64824c9cb..71df070bd0b 100644 --- a/jstests/ssl/ssl_hostname_validation.js +++ b/jstests/ssl/ssl_hostname_validation.js @@ -16,7 +16,7 @@ port = allocatePorts(1)[0]; function testCombination(certPath, allowInvalidCert, shouldSucceed) { MongoRunner.runMongod({port: port, - sslMode: "sslOnly", + sslMode: "requireSSL", sslPEMKeyFile: certPath, sslCAFile: CA_CERT}); @@ -56,7 +56,7 @@ testCombination(SERVER_CERT, false, false); testCombination(SERVER_CERT, true, true); // 2. Initiate ReplSetTest with invalid certs -ssl_options = {sslMode : "sslOnly", +ssl_options = {sslMode : "requireSSL", sslPEMKeyFile : SERVER_CERT, sslCAFile: CA_CERT}; @@ -66,7 +66,7 @@ assert.throws( function() { replTest.initiate() } ); replTest.stopSet(); // 3. Initiate ReplSetTest with invalid certs but set allowInvalidCertificates -ssl_options = {sslMode : "sslOnly", +ssl_options = {sslMode : "requireSSL", sslPEMKeyFile : SERVER_CERT, sslCAFile: CA_CERT, sslAllowInvalidCertificates: ""}; diff --git a/jstests/ssl/ssl_weak.js b/jstests/ssl/ssl_weak.js index 1e45b3d201f..b66429b0ed4 100644 --- a/jstests/ssl/ssl_weak.js +++ b/jstests/ssl/ssl_weak.js @@ -9,7 +9,7 @@ var baseName = "jstests_ssl_ssl_weak"; // Test that connecting with no client certificate and --sslWeakCertificateValidation connects // successfully. var md = startMongod( "--port", ports[0], "--dbpath", MongoRunner.dataPath + baseName + "1", - "--sslMode", "sslOnly", + "--sslMode", "requireSSL", "--sslPEMKeyFile", "jstests/libs/server.pem", "--sslCAFile", "jstests/libs/ca.pem", "--sslWeakCertificateValidation"); @@ -33,7 +33,7 @@ assert(mongo==0); // Test that connecting with no client certificate and no --sslWeakCertificateValidation fails to // connect. var md2 = startMongod( "--port", ports[1], "--dbpath", MongoRunner.dataPath + baseName + "2", - "--sslMode", "sslOnly", + "--sslMode", "requireSSL", "--sslPEMKeyFile", "jstests/libs/server.pem", "--sslCAFile", "jstests/libs/ca.pem"); diff --git a/jstests/ssl/x509_client.js b/jstests/ssl/x509_client.js index 0392a7baaa4..f4589e91bdd 100644 --- a/jstests/ssl/x509_client.js +++ b/jstests/ssl/x509_client.js @@ -47,7 +47,7 @@ function authAndTest(mongo) { print("1. Testing x.509 auth to mongod"); var mongo = MongoRunner.runMongod({port : port, - sslMode : "sslOnly", + sslMode : "requireSSL", sslPEMKeyFile : SERVER_CERT, sslCAFile : CA_CERT, auth:""}); @@ -56,7 +56,7 @@ authAndTest(mongo); stopMongod(port); print("2. Testing x.509 auth to mongos"); -var x509_options = {sslMode : "sslOnly", +var x509_options = {sslMode : "requireSSL", sslPEMKeyFile : SERVER_CERT, sslCAFile : CA_CERT}; diff --git a/jstests/sslSpecial/ssl_mixedmode.js b/jstests/sslSpecial/ssl_mixedmode.js index dba6fd57b2b..11217716183 100644 --- a/jstests/sslSpecial/ssl_mixedmode.js +++ b/jstests/sslSpecial/ssl_mixedmode.js @@ -10,7 +10,7 @@ var baseName = "jstests_mixed_mode_ssl" port = allocatePorts(1)[0]; function testCombination(sslMode, sslShell, shouldSucceed) { - if (sslMode == "noSSL") { + if (sslMode == "disabled") { MongoRunner.runMongod({port: port}); } else { @@ -44,12 +44,12 @@ function testCombination(sslMode, sslShell, shouldSucceed) { stopMongod(port); } -testCombination("noSSL", false, true); -testCombination("acceptSSL", false, true); -testCombination("sendAcceptSSL", false, true); -testCombination("sslOnly", false, false); -testCombination("noSSL", true, false); -testCombination("acceptSSL", true, true); -testCombination("sendAcceptSSL", true, true); -testCombination("sslOnly", true, true); +testCombination("disabled", false, true); +testCombination("allowSSL", false, true); +testCombination("preferSSL", false, true); +testCombination("requireSSL", false, false); +testCombination("disabled", true, false); +testCombination("allowSSL", true, true); +testCombination("preferSSL", true, true); +testCombination("requireSSL", true, true); diff --git a/jstests/sslSpecial/ssl_mixedmode2.js b/jstests/sslSpecial/ssl_mixedmode2.js index 75e8c1c69d4..6c506df2f9e 100644 --- a/jstests/sslSpecial/ssl_mixedmode2.js +++ b/jstests/sslSpecial/ssl_mixedmode2.js @@ -1,8 +1,8 @@ -// Test mixed sslMode noSSL/acceptSSL, this test cannot be run +// Test mixed sslMode disabled/allowSSL, this test cannot be run // from the /ssl directory since the --use-ssl passthrough // will make it impossible for the shell to connect to the replicas -ssl_options1 = {sslMode : "noSSL"}; -ssl_options2 = {sslMode : "acceptSSL", +ssl_options1 = {sslMode : "disabled"}; +ssl_options2 = {sslMode : "allowSSL", sslPEMKeyFile : "jstests/libs/server.pem", sslCAFile: "jstests/libs/ca.pem"}; load("jstests/replsets/replset1.js"); |