← 输入框|github.com|刷新
Skip to content

gh-65224: Improve the ssl error for check_hostname with server_side=True - #162779

Open
vasiliyk wants to merge 1 commit into
python:mainfrom
vasiliyk:gh-65224
Open

vasiliyk wants to merge 1 commit into
python:mainfrom
vasiliyk:gh-65224

Conversation

@vasiliyk

@vasiliyk vasiliyk commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

wrap_socket() and wrap_bio() with server_side=True on a context with check_hostname enabled raised check_hostname requires server_hostname, an argument a server cannot pass.

They now raise:

ValueError: check_hostname cannot be used with server_side=True; use a separate server context or disable check_hostname

I kept the restriction, like the other client-only settings rejected in the same function (server_hostname, session).

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #36221723 | 📁 Comparing f6c5d3a against main (d88a6b9)

  🔍 Preview build  

2 files changed
± library/ssl.html
± whatsnew/changelog.html

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.

1 participant