Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
qris opened this issue Aug 9, 2022 · 2 comments
Open

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

qris opened this issue Aug 9, 2022 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@qris
Copy link

qris commented Aug 9, 2022

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.

@qris qris added the docs Documentation in the Doc dir label Aug 9, 2022
@graingert
Copy link
Contributor

I think I've opened this one somewhere

@janbrasna
Copy link
Contributor

janbrasna commented Dec 19, 2023

Related:

Not entirely fixed as of today, as the edits were made to TLS v1.3 as min/max, yet the explainer says TLSv1.3 or newer, which is still wrong.

So the question is: should the max be changed to MAXIMUM_SUPPORTED (or left out completely?) or the description altered to say it's exactly TLS v1.3 only?
Maybe it should be changed back to ssl.TLSVersion.TLSv1_2 to demonstrate a range of versions as proposed via #105090 (comment) in #107273 …?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

3 participants