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
asyncio: add ssl_object extra info #69301
Comments
Attached patch adds the "ssl_object" extra information to SSL sockets. For the legacy SSL implementation, it's a ssl.SSLSocket instance. For the new SSL implementation, it's a ssl.SSLObject instance. ssl.SSLObject and ssl.SSLSocket have a similar but different API. Both classes provide important methods like getpeercert(). This issue fixes a regressions of Python 3.5 compared to Python 3.4 in asyncio SSL sockets: it's no more possible to get the peer certificate as a binary object (only as text). See the issue bpo-22768. My patch adds also unit tests on SSL extra info. We only had poor unit tests on these info. |
Workaround for Python 3.5.0: force the legacy SSL implementation. For example, monkey patch the asyncio module with: asyncio.sslproto._is_sslproto_availabe=lambda: False |
Guido? Yury? Can you please review attached patch? It looks like a Python 3.5 regression. |
the patch lgtm |
New changeset d7859e7e7071 by Victor Stinner in branch '3.4': |
New changeset 2f451651038c by Victor Stinner in branch '3.5': |
I pushed my change to Python 3.4, 3.6 and 3.6 and Github. The strange thing is the put a different "versionchanged" tag in the doc: version 3.4.4 in the 3.4 branch, version 3.5.1 in the 3.5 and default branches. |
New changeset 32e3a9e46f70 by Victor Stinner in branch '3.4': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: