python-trio / python-trio/trio

SSL: support trailing data on initialization?

Open
#195 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

polish TLS
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.