summaryrefslogtreecommitdiff
path: root/jstests/ssl/ssl_crl.js
blob: 96c12b91bb9fa67732eca60131ab2d22072c5829 (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
26
27
// Test CRLs
// This tests that using a CRL will allow clients with unrevoked certificates to connect.
// Also, tests that a server using an expired CRL will not allow connections.
// Note: crl_expired.pem is a CRL with no revoked certificates, but is an expired CRL.
//       crl.pem is a CRL with no revoked certificates.

load("jstests/libs/ssl_test.js");

var testUnrevoked = new SSLTest(
    // Server option overrides
    {
        sslMode: "requireSSL",
        sslCRLFile: "jstests/libs/crl.pem"
    }
);

assert(testUnrevoked.connectWorked());

var testRevoked = new SSLTest(
    // Server option overrides
    {
        sslMode: "requireSSL",
        sslCRLFile: "jstests/libs/crl_expired.pem"
    }
);

assert(!testRevoked.connectWorked());