summaryrefslogtreecommitdiff
path: root/jstests/sslSpecial/SERVER-26369.js
blob: 6118bacd1db9389545ce7785740852690c652d60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Validate the shardsrvr does not crash when enabling SSL with encrypted PEM for a cluster
// Checking UUID consistency involves talking to a shard node, which in this test is shutdown
TestData.skipCheckingUUIDsConsistentAcrossCluster = true;

(function() {
'use strict';

load("jstests/ssl/libs/ssl_helpers.js");

const st = new ShardingTest({shards: {rs0: {nodes: 1}}});
let opts = {
    sslMode: "allowSSL",
    sslPEMKeyFile: "jstests/libs/client.pem",
    sslCAFile: "jstests/libs/ca.pem",
    shardsvr: ''
};
requireSSLProvider('openssl', function() {
    // Only the OpenSSL provider supports encrypted PKCS#8
    opts.sslPEMKeyFile = "jstests/libs/password_protected.pem";
    opts.sslPEMKeyPassword = "qwerty";
});

st.rs0.restart(0, opts);
st.stop();
})();