Skip to content

Commit e04ccd0

Browse files
committed
Fix a few things in the ssl docs.
Expanded the PyMongo examples and fixed the node-mongodb-native link.
1 parent 484044d commit e04ccd0

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

source/administration/ssl.txt

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,25 @@ information about MMS configuration.
9494
PyMongo
9595
~~~~~~~
9696

97-
Add the "``ssl=true`` parameter to a PyMongo connection to create a
97+
Add the "``ssl=True``" parameter to a PyMongo connection to create a
9898
MongoDB connection to an SSL MongoDB instance:
9999

100100
.. code-block:: python
101101

102102
from pymongo import Connection
103-
c = Connection( host="mongodb.example.net", port=27017, ssl=True )
103+
c = Connection(host="mongodb.example.net", port=27017, ssl=True)
104+
105+
Do the following if you're connecting to a replica set:
106+
107+
.. code-block:: python
108+
109+
from pymongo import ReplicaSetConnection
110+
c = ReplicaSetConnection("mongodb.example.net:27017",
111+
replicaSet="mysetname", ssl=True)
112+
113+
PyMongo also supports an "``ssl=true``" option for the MongoDB URI::
114+
115+
mongodb://mongodb.example.net:27017/?ssl=true
104116

105117
Java
106118
~~~~
@@ -184,4 +196,4 @@ To connect to a replica set via SSL, use the following form:
184196
{rs_name:RS.name, ssl:ssl}
185197
);
186198

187-
.. _`node-mongodb-native1`: https://github.com/mongodb/node-mongodb-native
199+
.. _`node-mongodb-native`: https://github.com/mongodb/node-mongodb-native

0 commit comments

Comments
 (0)