FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-155327: Guard SSLSocket chain methods after TLS teardown by tonghuaroot · Pull Request #155328 · python/cpython · GitHub

/ cpython Public

gh-155327: Guard SSLSocket chain methods after TLS teardown - #155328

Open
tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:fix-sslsocket-chain-guard
Open

gh-155327: Guard SSLSocket chain methods after TLS teardown#155328
tonghuaroot wants to merge 1 commit into
python:mainfrom
tonghuaroot:fix-sslsocket-chain-guard

Conversation

tonghuaroot commented Aug 7, 2026
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

SSLSocket.get_verified_chain() and get_unverified_chain() accessed
self._sslobj without the _checkClosed() / None guard used by every other
query method, so they raised AttributeError when called after the TLS layer
was torn down (for example after unwrap()). Add the guard and return an empty
list, matching the value these methods return for an empty chain.

get_verified_chain() and get_unverified_chain() accessed self._sslobj without
the guard used by the other query methods, raising AttributeError after
unwrap(). Return an empty list instead.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL