Skip to content
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: expand comment
  • Loading branch information
woodruffw committed Nov 25, 2023
commit 732b953f3de5c60dbba1fee88eeb39bf2f602970
9 changes: 6 additions & 3 deletions Lib/ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,12 @@ def create_default_context(purpose=Purpose.SERVER_AUTH, *, cafile=None,
else:
raise ValueError(purpose)

# Make OpenSSL's chain building behave more like RFC 3280 5280,
# which specify that chain building stops with the first trust
# anchor, even if that anchor is not self-signed.
# `VERIFY_X509_PARTIAL_CHAIN` makes OpenSSL's chain building behave more
# like RFC 3280 and 5280, which specify that chain building stops with the
# first trust anchor, even if that anchor is not self-signed.
Comment thread
woodruffw marked this conversation as resolved.
# `VERIFY_X509_STRICT` makes OpenSSL more conservative about the
# certificates it accepts, including "disabling workarounds for
# some broken certificates."
context.verify_flags |= (_ssl.VERIFY_X509_PARTIAL_CHAIN |
_ssl.VERIFY_X509_STRICT)

Expand Down