File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,11 +74,16 @@ For example:
7474.. code-block :: python
7575
7676 from cassandra.cluster import Cluster
77- from ssl import PROTOCOL_TLSv1
77+ from ssl import PROTOCOL_TLSv1 , CERT_REQUIRED
7878
79- ssl_opts = {' ca_certs' : ' /path/to/my/ca.certs' ,
80- ' ssl_version' : PROTOCOL_TLSv1 }
79+ ssl_opts = {
80+ ' ca_certs' : ' /path/to/my/ca.certs' ,
81+ ' ssl_version' : PROTOCOL_TLSv1 ,
82+ ' cert_reqs' : CERT_REQUIRED # Certificates are required and validated
83+ }
8184 cluster = Cluster(ssl_options = ssl_opts)
8285
83- For further reading, Andrew Mussey has published a thorough guide on
86+ This is only an example to show how to pass the ssl parameters. Consider reading
87+ the `python ssl documentation <https://docs.python.org/2/library/ssl.html#ssl.wrap_socket >`_ for
88+ your configuration. For further reading, Andrew Mussey has published a thorough guide on
8489`Using SSL with the DataStax Python driver <http://blog.amussey.com/post/64036730812/cassandra-2-0-client-server-ssl-with-datastax-python >`_.
You can’t perform that action at this time.
0 commit comments