Skip to content

[3.13] gh-114905: Test that ssl._create_stdlib_context() rejects check_hostname with CERT_NONE (GH-155509) - #155670

Merged
serhiy-storchaka merged 1 commit into
python:3.13from
miss-islington:backport-726e485-3.13
Aug 13, 2026
Merged

[3.13] gh-114905: Test that ssl._create_stdlib_context() rejects check_hostname with CERT_NONE (GH-155509)#155670
serhiy-storchaka merged 1 commit into
python:3.13from
miss-islington:backport-726e485-3.13

Conversation

@miss-islington

@miss-islington miss-islington commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

With PROTOCOL_TLS_CLIENT, which became the default protocol in 3.10, this is
an error. With an explicitly specified legacy protocol it used to succeed,
silently raising verify_mode to CERT_REQUIRED and ignoring the requested
CERT_NONE.

No caller of ssl._create_stdlib_context() in the standard library passes
check_hostname, so no public API reaches it.
(cherry picked from commit 726e485)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

…_hostname with CERT_NONE (pythonGH-155509)

With PROTOCOL_TLS_CLIENT, which became the default protocol in 3.10, this is
an error.  With an explicitly specified legacy protocol it used to succeed,
silently raising verify_mode to CERT_REQUIRED and ignoring the requested
CERT_NONE.

No caller of ssl._create_stdlib_context() in the standard library passes
check_hostname, so no public API reaches it.
(cherry picked from commit 726e485)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) August 13, 2026 09:47
@serhiy-storchaka
serhiy-storchaka merged commit 427dfa6 into python:3.13 Aug 13, 2026
42 of 43 checks passed
@miss-islington
miss-islington deleted the backport-726e485-3.13 branch August 13, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants