Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit cbee16c

Browse files
committed
Merge branch 'vfaronov-docs-ssl-context' into development
2 parents 04f3266 + c6ae836 commit cbee16c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/source/advanced.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,14 @@ SSL/TLS Certificate Verification
7171

7272
By default, all HTTP/2 connections are made over TLS, and ``hyper`` bundles
7373
certificate authorities that it uses to verify the offered TLS certificates.
74-
Currently certificate verification cannot be disabled.
74+
75+
You can change how certificates are verified by passing your own
76+
``ssl_context`` to the :class:`HTTPConnection <hyper.HTTPConnection>`.
77+
For example, this will disable verification altogether::
78+
79+
import ssl
80+
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
81+
conn = HTTPConnection('http2bin.org:443', ssl_context=context)
7582

7683
Streaming Uploads
7784
-----------------

0 commit comments

Comments
 (0)