Skip to content

gh-152709: Document that PROTOCOL_SSLv3 and PROTOCOL_TLSv1* are not available with OpenSSL 4.0+ - #162084

Open
zeyadrabie wants to merge 1 commit into
python:mainfrom
zeyadrabie:gh-152709-ssl-openssl4-docs
Open

zeyadrabie wants to merge 1 commit into
python:mainfrom
zeyadrabie:gh-152709-ssl-openssl4-docs

Conversation

@zeyadrabie

@zeyadrabie zeyadrabie commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

When Python is built with OpenSSL 4.0+, PROTOCOL_SSLv3, PROTOCOL_TLSv1, PROTOCOL_TLSv1_1, and PROTOCOL_TLSv1_2 are no longer defined in _ssl.

This updates ssl.rst and the ssl.py docstring to note that those constants are unavailable on OpenSSL 4.0+. The three TLS entries say "This constant is not available" (rather than "This protocol") because TLS 1.0–1.2 still work via PROTOCOL_TLS_CLIENT / PROTOCOL_TLS_SERVER with minimum_version and maximum_version. Follows up on closed PR #152714, which was opened before #159388 fixed HAS_TLSv1* on OpenSSL 4.

(I used Claude Code (Opus 5.5) to check the _ssl.c guards, draft the doc edits, and test against OpenSSL 3.5.7 and 4.0.3 builds; I picked the wording, reviewed the diff, and ran the docs checks.)

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35917583 | 📁 Comparing 20ab1ff against main (7c59816)

  🔍 Preview build  

1 file changed
± library/ssl.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant