8000 gh-107361: strengthen default SSL context flags by woodruffw · Pull Request #112389 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-107361: strengthen default SSL context flags #112389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Mar 6, 2024
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
whatsnew/3.13: add note for disabling VERIFY_X509_STRICT
  • Loading branch information
woodruffw committed Dec 6, 2023
commit f1b59ed5ab3cd828c7705349a2f5c31e361c9306
10 changes: 10 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ Other Language Changes
* The :func:`ssl.create_default_context` API now includes
:data:`ssl.VERIFY_X509_PARTIAL_CHAIN` and :data:`ssl.VERIFY_X509_STRICT`
in its default flags.

.. note::

:data:`ssl.VERIFY_X509_STRICT` may reject pre-:rfc:`5280` or malformed
certificates that the underlying OpenSSL implementation otherwise would
accept. While disabling this is not recommended, you can do so using::

ctx = ssl.create_default_context()
ctx.verify_flags &= ~ssl.VERIFY_X509_STRICT

(Contributed by William Woodruff in :gh:`112389`.)

New Modules
Expand Down
0