Skip to content

Commit

Permalink
Updated documentation for SSL client cert usuage.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
muhtasib committed Jul 10, 2012
1 parent b7fd0e8 commit 051d3bb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,7 @@ Patches and Suggestions
- Danilo Bargen (gwrtheyrn)
- Torsten Landschoff
- Michael Holler (apotheos)
- Timnit Gebru
- Sarah Gonzalez
- Victoria Mo
- Leila Muhtasib
17 changes: 17 additions & 0 deletions docs/user/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------------
Expand Down

0 comments on commit 051d3bb

Please sign in to comment.