summaryrefslogtreecommitdiff
path: root/jstests/ocsp
diff options
context:
space:
mode:
authorShreyas Kalyan <shreyas.kalyan@10gen.com>2020-03-02 14:18:29 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-02 20:49:42 +0000
commit83854e39d2904b5d4a6e4ee1f9b4fedaa4df85a5 (patch)
tree35b08e53e8fec214c235d4d02818c096a0e9731c /jstests/ocsp
parent1f1a897967924e2142d011c20600385d0cff5d4b (diff)
downloadmongo-83854e39d2904b5d4a6e4ee1f9b4fedaa4df85a5.tar.gz
SERVER-46539 Fix issue with stapling and a down responder
Diffstat (limited to 'jstests/ocsp')
-rw-r--r--jstests/ocsp/ocsp_stapling.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/jstests/ocsp/ocsp_stapling.js b/jstests/ocsp/ocsp_stapling.js
index 4d7e3c0532b..630b544c9be 100644
--- a/jstests/ocsp/ocsp_stapling.js
+++ b/jstests/ocsp/ocsp_stapling.js
@@ -14,9 +14,6 @@ if (!supportsStapling()) {
return;
}
-let mock_ocsp = new MockOCSPServer("", 1000);
-mock_ocsp.start();
-
const ocsp_options = {
sslMode: "requireSSL",
sslPEMKeyFile: OCSP_SERVER_CERT,
@@ -27,8 +24,19 @@ const ocsp_options = {
},
};
+// This is to test what happens when the responder is down,
+// making sure that we soft fail.
let conn = null;
+assert.doesNotThrow(() => {
+ conn = MongoRunner.runMongod(ocsp_options);
+});
+
+MongoRunner.stopMongod(conn);
+
+let mock_ocsp = new MockOCSPServer("", 1000);
+mock_ocsp.start();
+
// In this scenario, the Mongod has the ocsp response stapled
// which should allow the connection to proceed. Even when the
// responder says that the certificate is revoked, the mongod