Skip to content

Example requires exactly TLSv1.3, but explanation says TLSv1.2 and later #95816

@qris

Description

@qris

Documentation

The example at https://docs.python.org/3/library/ssl.html#protocol-versions says:

client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
client_context.minimum_version = ssl.TLSVersion.TLSv1_3
client_context.maximum_version = ssl.TLSVersion.TLSv1_3

Which should require exactly TLSv1.3 (no higher or lower). But the explanation then says:

The SSL context created above will only allow TLSv1.2 and later (if supported by your system) connections to a server.

I think this is an incorrect statement. I also think the example is not ideal, as it would be strange to refuse to use more recent versions of TLS if they were supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions