Skip to content
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

Rework code structure for record layer #431

Merged
merged 10 commits into from
May 14, 2020
Merged

Rework code structure for record layer #431

merged 10 commits into from
May 14, 2020

Conversation

ocheron
Copy link
Contributor

@ocheron ocheron commented May 13, 2020

After adding the internal record layer API, we can reorganize the code and make a clear boundary between TLS code and the RL implementation. Content that previously existed in modules IO, Sending, Sending13 but implemented the record layer is moved to new modules Writing and Reading. Modules Sending13 / Receiving13 are small and can be merged into Sending / Receiving.

Following the change to sendPacket, I continue to remove unneeded MonadIO contexts.
And simplify a few things along the way.

ocheron added 10 commits May 8, 2020 14:57
All exceptions that are raised internally should have a defined and
controlled mapping to TLS alerts.  This is what TLSError provides.
The parts implementing the normal TLS record layer are moved to new
modules.  This adds a clear separation with the rest of the code in
upper layers.
The modules are small so can be merged with the non-TLS13 modules.
@kazu-yamamoto kazu-yamamoto self-requested a review May 13, 2020 22:15
Copy link
Collaborator

@kazu-yamamoto kazu-yamamoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very good re-structuring.

@kazu-yamamoto kazu-yamamoto merged commit 1875e69 into haskell-tls:master May 14, 2020
@ocheron
Copy link
Contributor Author

ocheron commented May 14, 2020

Thank you.
I'm happy with the result too, we see easily the part not used for QUIC.

@ocheron ocheron deleted the rework-rl branch May 14, 2020 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants