8000 Fix typo in PROTOCOL_TO_TLS_VERSION in test_ssl (GH-95119) · python/cpython@934b25d · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 934b25d

Browse files
authored
Fix typo in PROTOCOL_TO_TLS_VERSION in test_ssl (GH-95119)
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.
1 parent d06c552 commit 934b25d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_ssl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
PROTOCOL_TO_TLS_VERSION = {}
4949
for proto, ver in (
50-
("PROTOCOL_SSLv23", "SSLv3"),
50+
("PROTOCOL_SSLv3", "SSLv3"),
5151
("PROTOCOL_TLSv1", "TLSv1"),
5252
("PROTOCOL_TLSv1_1", "TLSv1_1"),
5353
):

0 commit comments

Comments
 (0)
0