tls-parser icon indicating copy to clipboard operation
tls-parser copied to clipboard

Support parsing partial data

Open traceflight opened this issue 6 months ago • 6 comments

Related issue #84

traceflight avatar Aug 22 '25 13:08 traceflight

hi @chifflier, would you be available to review this pull request when you have a moment?

traceflight avatar Sep 09 '25 14:09 traceflight

Indeed, the caller cannot know whether the message is partial. Or we could keep the original API and record whether the message is partial in the returned structs. Is this better?

traceflight avatar Sep 10 '25 12:09 traceflight

Indeed, the caller cannot know whether the message is partial. Or we could keep the original API and record whether the message is partial in the returned structs. Is this better?

At the moment I'd be tempted to:

  • keep the current API (see below)
  • add private field(s) to structs to track the complete/incomplete state (bool/usize/...?)
  • add a getter method to test if parsing is complete
  • extend the API to
    • add methods to request possibly incomplete parsing (and treat current methods as requesting complete only)
    • ensure we can restart parsing when we have an incomplete message, and new data

chifflier avatar Sep 12 '25 08:09 chifflier

@traceflight just wondering, do you want to update your PR according to the last comments ? Or submit a new one, if you think this is more appropriate?

chifflier avatar Sep 15 '25 10:09 chifflier

@traceflight just wondering, do you want to update your PR according to the last comments ? Or submit a new one, if you think this is more appropriate?

Yes, I will update the PR later according to the last comments.

traceflight avatar Sep 15 '25 13:09 traceflight

I have added a flag to some types of handshake message, but i'm not sure if it is appropriate.

traceflight avatar Sep 24 '25 14:09 traceflight