python-trio / python-trio/trio
SSL: support trailing data on initialization?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
In theory, when switching from another protocol (i.e. doing STARTTLS), it might happen that the code that wants to switch has "over-read" from the socket, and already pulled out part of the TLS handshake. In practice, I don't know that this ever comes up – e.g., in SMTP, STARTTLS works like: (a) client says "let's do this", (b) server says "ok", (c) client starts the handshake, so it can never be the case that the server has read too far. But it's easy to implement and theoretically could be useful.
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 by locating Trio's SSL initialization and handshake handling, then inspect how buffered data from a preceding protocol is represented and tested. Done means initialization can accept trailing bytes already read from the socket without losing them, with coverage for the proposed STARTTLS-style case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100