Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes from1 commit
Commits
Show all changes
19 commits Select commitHold shift + click to select a range
f0e262e
gh-107361: strengthen default SSL context flags
woodruffw4782048
add news entry
woodruffw732b953
ssl: expand comment
woodruffw15c0313
ssl.rst: further explain new X509 flags
woodruffw2aceb81
whatsnew: add ssl.create_default_context changes
woodruffweb2c6e4
gitattributes: mark certdata as generated
woodruffw668803c
gitattributes: avoid {} glob syntax
woodruffwda318a6
Update Doc/library/ssl.rst
woodruffw4ae44d1
ssl.rst: explain how to disable VERIFY_X509_STRICT
woodruffw792383a
Apply suggestions from code review
woodruffwf1b59ed
whatsnew/3.13: add note for disabling VERIFY_X509_STRICT
woodruffwc8a7bb5
Merge remote-tracking branch 'upstream/main' into default-ssl-verify-…
woodruffwf6c3af3
test: add a backstop test for VERIFY_X509_STRICT
woodruffwff087fb
test: try a higher base error
woodruffwe46a672
test: require OpenSSL 3+ for test_verify_strict
woodruffwfe42d9a
Merge remote-tracking branch 'upstream/main' into default-ssl-verify-…
woodruffw1a3e037
test: whitespace
woodruffwcef6950
Merge remote-tracking branch 'upstream/main' into default-ssl-verify-…
woodruffw2c7b14e
Merge remote-tracking branch 'upstream/main' into default-ssl-verify-…
woodruffwFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
ssl.rst: explain how to disable VERIFY_X509_STRICT
Signed-off-by: William Woodruff <william@yossarian.net>
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commit4ae44d1e7bad2925dd5b7b60234163364bc901b3
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
woodruffw marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
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 | ||
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.