From: Leila Muhtasib Date: Tue, 10 Jul 2012 22:25:32 +0000 (-0400) Subject: Updated documentation for SSL client cert usuage. X-Git-Tag: v0.13.3~5^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=051d3bb601c9cb5a4b14cfc6244c680ed220f44a;p=services%2Fpython-requests.git Updated documentation for SSL client cert usuage. Co-Authored By: Timnit Gebru Co-Authored By: Sarah Gonzalez Co-Authored By: Victoria Mo --- diff --git a/AUTHORS.rst b/AUTHORS.rst index dc73b64..b1e8ec2 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -105,3 +105,7 @@ Patches and Suggestions - Danilo Bargen (gwrtheyrn) - Torsten Landschoff - Michael Holler (apotheos) +- Timnit Gebru +- Sarah Gonzalez +- Victoria Mo +- Leila Muhtasib diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index 31c6760..e228bbf 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -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) + + +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')) + + +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 ---------------------