Skip to content
Myr

Merge pull request #2948 from vincentbernat/patch-1

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Cory Benfield · committed by Cory Benfield · parents a1c9b84, f14f308 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • advanced: use "client.*" to designate client certificate

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:docs/user/advanced.rst+2 added-2 removed
218 unmodified lines
219You can also specify a local cert to use as client side certificate, as a single220file (containing the private key and the certificate) or as a tuple of both221file's path::222223 >>> requests.get('https://kennethreitz.com', cert=('/path/server.crt', '/path/key'))223 >>> requests.get('https://kennethreitz.com', cert=('/path/client.cert', '/path/client.key'))224 <Response [200]>225226If you specify a wrong path or an invalid cert::227228 >>> requests.get('https://kennethreitz.com', cert='/wrong_path/server.pem')228 >>> requests.get('https://kennethreitz.com', cert='/wrong_path/client.pem')229 SSLError: [Errno 336265225] _ssl.c:347: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib230231.. _ca-certificates:232
663 unmodified lines