Updated documentation for SSL client cert usuage.
authorLeila Muhtasib <muhtasib@gmail.com>
Tue, 10 Jul 2012 22:25:32 +0000 (18:25 -0400)
committerLeila Muhtasib <muhtasib@gmail.com>
Tue, 10 Jul 2012 22:25:32 +0000 (18:25 -0400)
Co-Authored By: Timnit Gebru <tgebru@gmail.com>
Co-Authored By: Sarah Gonzalez <smar.gonz@gmail.com>
Co-Authored By: Victoria Mo <vm2355@columbia.edu>

AUTHORS.rst
docs/user/advanced.rst

index dc73b64c0bb585b8e420b2f6d6aa66e842d01161..b1e8ec23e691d16f588c55f588f3469df6cd7cde 100644 (file)
@@ -105,3 +105,7 @@ Patches and Suggestions
 - Danilo Bargen (gwrtheyrn)
 - Torsten Landschoff
 - Michael Holler (apotheos)
+- Timnit Gebru
+- Sarah Gonzalez
+- Victoria Mo
+- Leila Muhtasib
index 31c676014e1ce3b4be1b01ac85a153fa9ea228fd..e228bbf4d7afd5cac2c13ee7dfe9172c0235fc8a 100644 (file)
@@ -93,6 +93,23 @@ I don't have SSL setup on this domain, so it fails. Excellent. Github does thoug
 
 You can also pass ``verify`` the path to a CA_BUNDLE file for private certs. You can also set the ``REQUESTS_CA_BUNDLE`` environment variable.
 
+Requests can also ignore verifying the SSL certficate if you set ``verify`` to False.
+
+    >>> requests.get('https://kennethreitz.com', verify=False)
+    <Response [200]>
+
+By default, ``verify`` is set to True. Option ``verify`` only applies to host certs.
+
+You can also specify the local cert file either as a path or key value pair::
+
+    >>> requests.get('https://kennethreitz.com', cert=('/path/server.crt', '/path/key'))
+    <Response [200]>
+
+If you specify a wrong path or an invalid cert::
+
+    >>> requests.get('https://kennethreitz.com', cert='/wrong_path/server.pem')
+    SSLError: [Errno 336265225] _ssl.c:347: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib
+
 
 Body Content Workflow
 ---------------------