From f14f30817e80b8181ae79114691230d3af1b6f55 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 28 Dec 2015 16:21:53 +0100 Subject: [PATCH] advanced: use "client.*" to designate client certificate Using "server.crt" is confusing as one may try to put the server certificate while this is really the client certificate that should be put here. Instead, use "client.cert", "client.key" and "client.pem". --- docs/user/advanced.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index f0d2ffd9..8bd7f907 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -220,12 +220,12 @@ You can also specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both file's path:: - >>> requests.get('https://kennethreitz.com', cert=('/path/server.crt', '/path/key')) + >>> requests.get('https://kennethreitz.com', cert=('/path/client.cert', '/path/client.key')) If you specify a wrong path or an invalid cert:: - >>> requests.get('https://kennethreitz.com', cert='/wrong_path/server.pem') + >>> requests.get('https://kennethreitz.com', cert='/wrong_path/client.pem') SSLError: [Errno 336265225] _ssl.c:347: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib .. _ca-certificates: