Skip to content

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

Merged
serhiy-storchaka merged 3 commits into
python:3.15from
miss-islington:backport-726e485-3.15
Oct 10, 2026
Merged

serhiy-storchaka merged 3 commits into
python:3.15from
miss-islington:backport-726e485-3.15

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) October 10, 2026 08:46
@serhiy-storchaka
serhiy-storchaka merged commit c6465bc into python:3.15 Oct 10, 2026
50 checks passed
@miss-islington
miss-islington deleted the backport-726e485-3.15 branch October 10, 2026 09:16
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