@@ -56,11 +56,11 @@ SSL certificate using a command that resembles the following:
56
56
openssl req -new -x509 -days 365 -nodes -out mongodb-cert.pem -keyout mongodb-cert.key
57
57
58
58
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:
60
60
61
61
.. code-block:: sh
62
62
63
- cat mongodb-cert.crt mongodb-cert.pem > mongodb.pem
63
+ cat mongodb-cert.crt mongodb-cert.pem > mongodb.pem
64
64
65
65
Clients
66
66
-------
@@ -115,7 +115,7 @@ To connect to a replica set, use the following operation:
115
115
c = ReplicaSetConnection("mongodb.example.net:27017",
116
116
replicaSet="mysetname", ssl=True)
117
117
118
- PyMongo also supports an "``ssl=true``" option for the MongoDB URI:
118
+ PyMongo also supports an "``ssl=true``" option for the MongoDB URI:
119
119
120
120
.. code-block:: none
121
121
@@ -185,9 +185,9 @@ Node.JS (``node-mongodb-native``)
185
185
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
186
186
187
187
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:
189
189
190
- .. code-block:: javascript
190
+ .. code-block:: javascript
191
191
192
192
var db1 = new Db(MONGODB, new Server("127.0.0.1", 27017,
193
193
{ auto_reconnect: false, poolSize:4, ssl:ssl } );
@@ -207,20 +207,25 @@ To connect to a replica set via SSL, use the following form:
207
207
208
208
.NET
209
209
~~~~
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:
212
215
213
216
.. code-block:: csharp
214
217
215
218
var connectionString = "mongodb://localhost/?ssl=true";
216
219
var server = MongoServer.Create(connectionString);
217
220
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:
222
227
223
228
.. code-block:: csharp
224
229
225
230
var connectionString = "mongodb://localhost/?ssl=true&sslverifycertificate=false";
226
- var server = MongoServer.Create(connectionString);
231
+ var server = MongoServer.Create(connectionString);
0 commit comments