Skip to content

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

Open
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-726e485-3.15
Open

[3.15] gh-114905: Test that ssl._create_stdlib_context() rejects check_hostname with CERT_NONE (GH-155509)#155672
miss-islington wants to merge 1 commit 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>
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