Skip to content

Commit ce05f96

Browse files
author
Nicolas Le Manchet
committed
Document the usage of client certificates
Fixes mjs#339
1 parent 88b7279 commit ce05f96

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/src/concepts.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ an up-to-date set of trusted CAs::
116116

117117
ssl_context = ssl.create_default_context(cafile=certifi.where())
118118

119+
If the server supports it, you can also authenticate using a client
120+
certificate::
121+
122+
import ssl
123+
124+
ssl_context = ssl.create_default_context()
125+
ssl_context.load_cert_chain("/path/to/client_certificate.crt")
126+
119127
The above examples show some of the most common TLS parameter
120128
customisations but there are many other tweaks are possible. Consult
121129
the Python 3 :py:mod:`ssl` package documentation for further options.

0 commit comments

Comments
 (0)