Skip to content

Commit dbd8985

Browse files
authored
gh-95816: Fix TLS version range example in docs (GH-148574)
docs(ssl): Fix TLS version range example
1 parent 00ea776 commit dbd8985

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
@@ -2076,7 +2076,7 @@ to speed up repeated connections from the same clients.
20762076
:attr:`~SSLContext.minimum_version` and
20772077
:attr:`SSLContext.options` all affect the supported SSL
20782078
and TLS versions of the context. The implementation does not prevent
2079-
invalid combination. For example a context with
2079+
invalid combinations. For example a context with
20802080
:attr:`OP_NO_TLSv1_2` in :attr:`~SSLContext.options` and
20812081
:attr:`~SSLContext.maximum_version` set to :attr:`TLSVersion.TLSv1_2`
20822082
will not be able to establish a TLS 1.2 connection.
@@ -2891,11 +2891,11 @@ disabled by default.
28912891
::
28922892

28932893
>>> client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
2894-
>>> client_context.minimum_version = ssl.TLSVersion.TLSv1_3
2894+
>>> client_context.minimum_version = ssl.TLSVersion.TLSv1_2
28952895
>>> client_context.maximum_version = ssl.TLSVersion.TLSv1_3
28962896

28972897

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

0 commit comments

Comments
 (0)