Skip to content

Commit 277ed8b

Browse files
janbrasnamiss-islington
authored andcommitted
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 9e071c9 commit 277ed8b

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
@@ -1943,7 +1943,7 @@ to speed up repeated connections from the same clients.
19431943
:attr:`~SSLContext.minimum_version` and
19441944
:attr:`SSLContext.options` all affect the supported SSL
19451945
and TLS versions of the context. The implementation does not prevent
1946-
invalid combination. For example a context with
1946+
invalid combinations. For example a context with
19471947
:attr:`OP_NO_TLSv1_2` in :attr:`~SSLContext.options` and
19481948
:attr:`~SSLContext.maximum_version` set to :attr:`TLSVersion.TLSv1_2`
19491949
will not be able to establish a TLS 1.2 connection.
@@ -2746,11 +2746,11 @@ disabled by default.
27462746
::
27472747

27482748
>>> client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
2749-
>>> client_context.minimum_version = ssl.TLSVersion.TLSv1_3
2749+
>>> client_context.minimum_version = ssl.TLSVersion.TLSv1_2
27502750
>>> client_context.maximum_version = ssl.TLSVersion.TLSv1_3
27512751

27522752

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

0 commit comments

Comments
 (0)