Thanks to visit codestin.com
Credit goes to github.com

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
ssl.rst: explain how to disable VERIFY_X509_STRICT
Signed-off-by: William Woodruff <[email protected]>
  • Loading branch information
woodruffw committed Dec 1, 2023
commit 4ae44d1e7bad2925dd5b7b60234163364bc901b3
9 changes: 9 additions & 0 deletions Doc/library/ssl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@ purposes.
ctx = ssl.create_default_context(Purpose.CLIENT_AUTH)
ctx.options &= ~ssl.OP_NO_SSLv3

.. note::
This context enables :data:`VERIFY_X509_STRICT` by default, which
may reject older (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

.. versionadded:: 3.4

.. versionchanged:: 3.4.4
Expand Down