Skip to content

Commit a1850b7

Browse files
author
Sam Kleinman
committed
minor: edits to ssl
1 parent 37f914f commit a1850b7

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

source/administration/ssl.txt

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ SSL certificate using a command that resembles the following:
5656
openssl req -new -x509 -days 365 -nodes -out mongodb-cert.pem -keyout mongodb-cert.key
5757

5858
To create the combined ``.pem`` file that contains the ``.key`` file
59-
and the ``.pem`` certificate, use the following command:
59+
and the ``.pem`` certificate, use the following command:
6060

6161
.. code-block:: sh
6262

63-
cat mongodb-cert.crt mongodb-cert.pem > mongodb.pem
63+
cat mongodb-cert.crt mongodb-cert.pem > mongodb.pem
6464

6565
Clients
6666
-------
@@ -115,7 +115,7 @@ To connect to a replica set, use the following operation:
115115
c = ReplicaSetConnection("mongodb.example.net:27017",
116116
replicaSet="mysetname", ssl=True)
117117

118-
PyMongo also supports an "``ssl=true``" option for the MongoDB URI:
118+
PyMongo also supports an "``ssl=true``" option for the MongoDB URI:
119119

120120
.. code-block:: none
121121

@@ -185,9 +185,9 @@ Node.JS (``node-mongodb-native``)
185185
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
186186

187187
In the `node-mongodb-native`_ driver, use the following invocation to
188-
connect to an :program:`mongod` instance via SSL:
188+
connect to a :program:`mongod` or :program:`mongos`instance via SSL:
189189

190-
.. code-block:: javascript
190+
.. code-block:: javascript
191191

192192
var db1 = new Db(MONGODB, new Server("127.0.0.1", 27017,
193193
{ auto_reconnect: false, poolSize:4, ssl:ssl } );
@@ -207,20 +207,25 @@ To connect to a replica set via SSL, use the following form:
207207

208208
.NET
209209
~~~~
210-
As of release 1.6 of the .NET driver, to use SSL with a server, all that is needed
211-
is to add an option to the connection string, "ssl=true".
210+
211+
As of release 1.6 of the .NET driver supports SSL connections with
212+
:program:`mongod` an :program:`mongos` instances. To connect using
213+
SSL, you must add an option to the connection string, specifying
214+
``ssl=true`` as follows:
212215

213216
.. code-block:: csharp
214217

215218
var connectionString = "mongodb://localhost/?ssl=true";
216219
var server = MongoServer.Create(connectionString);
217220

218-
Using SSL in the .NET driver will cause the server certificates to get validated
219-
against the local trusted certificate store. This can cause issues in testing due
220-
to test machines not having trusted certificates. If this is the case, you can
221-
add another option to prevent validating the certificates, "sslverifycertificate=false".
221+
The .NET driver will validate the certificate against the local
222+
trusted certificate store, in addition to providing encryption of the
223+
server. This behavior may produce issues during testing, if the server
224+
uses a self-signed certificate. If you encounter this issue, add the
225+
``sslverifycertificate=false`` option to the connection string to
226+
prevent the .NET driver from validating the certificate, as follows:
222227

223228
.. code-block:: csharp
224229

225230
var connectionString = "mongodb://localhost/?ssl=true&sslverifycertificate=false";
226-
var server = MongoServer.Create(connectionString);
231+
var server = MongoServer.Create(connectionString);

0 commit comments

Comments
 (0)