diff options
author | Andreas Nilsson <andreas.nilsson@10gen.com> | 2013-11-14 19:08:35 +0000 |
---|---|---|
committer | Andreas Nilsson <andreas.nilsson@10gen.com> | 2013-11-14 19:55:55 +0000 |
commit | 8041835681df6b4b7b606aa45f979e274cacbe5d (patch) | |
tree | 7f87ebdc522bcd85d1960bf32e54ff5f9cb1f4dc /jstests/ssl | |
parent | 9f5101d6e90e1da2b76423bf2f066107639ba4e0 (diff) | |
download | mongo-8041835681df6b4b7b606aa45f979e274cacbe5d.tar.gz |
SERVER-11375 Change names of sslMode states
Diffstat (limited to 'jstests/ssl')
-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 |
9 files changed, 20 insertions, 20 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}; |