python-trio / python-trio/trio
Session handling in SSLStream
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
Python 3.6 added some APIs for session handling; for example, wrap_bio now takes a session= argument. We should expose these as well.
Also note that there may be a bug with session reuse when Python 3.6 is combined with openssl 1.1.0: https://github.com/openssl/openssl/issues/1550#issuecomment-287179654
It sounds like this can be worked around by making sure to always call SSL_shutdown. (We could do this and then not actually send the resulting bytes, even when https_compatible=True.) But CPython might have already implemented a workaround, so maybe this doesn't matter. (Note the explanation for what's going on didn't come until after 3.6's release though.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the SSLStream implementation and compare its session-handling surface with Python 3.6's ssl APIs, especially wrap_bio's session= argument. Check the linked OpenSSL and CPython discussions before deciding whether shutdown handling is needed; done means the relevant session APIs are exposed with coverage for their behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100