Skip to content

Fix a few things in the ssl docs. #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions source/administration/ssl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,25 @@ information about MMS configuration.
PyMongo
~~~~~~~

Add the "``ssl=true`` parameter to a PyMongo connection to create a
Add the "``ssl=True``" parameter to a PyMongo connection to create a
MongoDB connection to an SSL MongoDB instance:

.. code-block:: python

from pymongo import Connection
c = Connection( host="mongodb.example.net", port=27017, ssl=True )
c = Connection(host="mongodb.example.net", port=27017, ssl=True)

Do the following if you're connecting to a replica set:

.. code-block:: python

from pymongo import ReplicaSetConnection
c = ReplicaSetConnection("mongodb.example.net:27017",
replicaSet="mysetname", ssl=True)

PyMongo also supports an "``ssl=true``" option for the MongoDB URI::

mongodb://mongodb.example.net:27017/?ssl=true

Java
~~~~
Expand Down Expand Up @@ -184,4 +196,4 @@ To connect to a replica set via SSL, use the following form:
{rs_name:RS.name, ssl:ssl}
);

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