Skip to content

Fix typo in PROTOCOL_TO_TLS_VERSION in test_ssl#95119

Merged
miss-islington merged 1 commit into
python:mainfrom
davidben:fix-sslv23-typo
Jul 22, 2022
Merged

Fix typo in PROTOCOL_TO_TLS_VERSION in test_ssl#95119
miss-islington merged 1 commit into
python:mainfrom
davidben:fix-sslv23-typo

Conversation

@davidben

@davidben davidben commented Jul 22, 2022

Copy link
Copy Markdown
Contributor

This appears to be a typo. It causes try_protocol_combo to try to turn
on SSL 3.0 when testing PROTOCOL_SSLv23 (aka PROTOCOL_TLS), which
doesn't make any sense. Fix it to be PROTOCOL_SSLv3.

Without this, try_protocol_combo is actually setting
context.minimum_version to SSLv3 when called as
try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLS, True)

One would think this causes a no-ssl3 OpenSSL build to fail, but OpenSSL
forgot to make SSL_CTX_set_min_proto_version(SSL3_VERSION) does not
notice no-ssl3, so this typo has gone undetected. But we should still
fix the typo because, presumably, a future version of OpenSSL will
remove SSL 3.0 and do so more thoroughly, at which point this will
break.

Automerge-Triggered-By: GH:alex

This appears to be a typo. It causes try_protocol_combo to try to turn
on SSL 3.0 when testing PROTOCOL_SSLv23 (aka PROTOCOL_TLS), which
doesn't make any sense. Fix it to be PROTOCOL_SSLv3.

Without this, try_protocol_combo is actually setting
context.minimum_version to SSLv3 when called as
try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLS, True)

One would think this causes a no-ssl3 OpenSSL build to fail, but OpenSSL
forgot to make SSL_CTX_set_min_proto_version(SSL3_VERSION) does not
notice no-ssl3, so this typo has gone undetected. But we should still
fix the typo because, presumably, a future version of OpenSSL will
remove SSL 3.0 and do so more thoroughly, at which point this will
break.
@alex

alex commented Jul 22, 2022

Copy link
Copy Markdown
Member

fyi: @tiran

@tiran

tiran commented Jul 22, 2022

Copy link
Copy Markdown
Member

Thanks! I'm going to drop the code in #94599 anyway :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip issue skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants