@@ -87,14 +87,40 @@ cluster topology.
8787## TLS With Verification
8888
8989The test suite includes a set of TLS certificates for configuring a server
90- and a client to perform full TLS verification. The server can be started as
91- follows, if the current directory is the top of the driver source tree:
90+ and a client to perform full TLS verification in the ` spec/support/certificates `
91+ directory. The server can be started as follows, if the current directory is
92+ the top of the driver source tree:
9293
9394 mlaunch init --single --dir /tmp/mdb-ssl --sslMode requireSSL \
9495 --sslPEMKeyFile `pwd`/spec/support/certificates/server.pem \
9596 --sslCAFile `pwd`/spec/support/certificates/ca.pem \
9697 --sslClientCertificate `pwd`/spec/support/certificates/client.pem
9798
99+ To test that the driver works when the server's certificate is signed by an
100+ intermediate certificate (i.e. uses certificate chaining), use the chained
101+ server certificate bundle:
102+
103+ mlaunch init --single --dir /tmp/mdb-ssl --sslMode requireSSL \
104+ --sslPEMKeyFile `pwd`/spec/support/certificates/server-second-level-bundle.pem \
105+ --sslCAFile `pwd`/spec/support/certificates/ca.pem \
106+ --sslClientCertificate `pwd`/spec/support/certificates/client.pem
107+
108+ The driver's test suite is configured to verify certificates by default.
109+ If the server is launched with the certificates from the driver's test suite,
110+ the test suite can be run simply by specifying ` tls=true ` URI option:
111+
112+ MONGODB_URI='mongodb://localhost:27017/?tls=true' rake
113+
114+ The driver's test suite can also be executed against a server launched with
115+ any other certificates. In this case the certificates need to be explicitly
116+ specified in the URI, for example as follows:
117+
118+ MONGODB_URI='mongodb://localhost:27017/?tls=true&tlsCAFile=path/to/ca.crt&tlsCertificateKeyFile=path/to/client.pem' rake
119+
120+ Note that some tests (specifically testing TLS verification) expect the server
121+ to be launched using the certificates in the driver's test suite, and will
122+ fail when run against a server using other certificates.
123+
98124## TLS Without Verification
99125
100126It is also possible to enable TLS but omit certificate verification. In this
@@ -111,6 +137,9 @@ verification, run:
111137
112138 MONGODB_URI='mongodb://localhost:27017/?tls=true&tlsInsecure=true' rake
113139
140+ Note that there are tests in the test suite that cover TLS verification, and
141+ they may fail if the test suite is run in this way.
142+
114143## Authentication
115144
116145mlaunch can configure authentication on the server:
0 commit comments