Skip to content

Commit fd1cf39

Browse files
[3.14] gh-95816: Fix TLS version range example in docs (GH-148574) (#150009)
gh-95816: Fix TLS version range example in docs (GH-148574) docs(ssl): Fix TLS version range example (cherry picked from commit dbd8985) Co-authored-by: Jan Brasna <1784648+janbrasna@users.noreply.github.com>
1 parent 21a7236 commit fd1cf39

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/ssl.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,7 @@ to speed up repeated connections from the same clients.
19501950
:attr:`~SSLContext.minimum_version` and
19511951
:attr:`SSLContext.options` all affect the supported SSL
19521952
and TLS versions of the context. The implementation does not prevent
1953-
invalid combination. For example a context with
1953+
invalid combinations. For example a context with
19541954
:attr:`OP_NO_TLSv1_2` in :attr:`~SSLContext.options` and
19551955
:attr:`~SSLContext.maximum_version` set to :attr:`TLSVersion.TLSv1_2`
19561956
will not be able to establish a TLS 1.2 connection.
@@ -2753,11 +2753,11 @@ disabled by default.
27532753
::
27542754

27552755
>>> client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
2756-
>>> client_context.minimum_version = ssl.TLSVersion.TLSv1_3
2756+
>>> client_context.minimum_version = ssl.TLSVersion.TLSv1_2
27572757
>>> client_context.maximum_version = ssl.TLSVersion.TLSv1_3
27582758

27592759

2760-
The SSL context created above will only allow TLSv1.3 and later (if
2760+
The SSL client context created above will only allow TLSv1.2 and TLSv1.3 (if
27612761
supported by your system) connections to a server. :const:`PROTOCOL_TLS_CLIENT`
27622762
implies certificate validation and hostname checks by default. You have to
27632763
load certificates into the context.

0 commit comments

Comments
 (0)