-
Notifications
You must be signed in to change notification settings - Fork 171
[WIP] DTLS 1.3 configuration and architecture #738
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
base: master
Are you sure you want to change the base?
Conversation
|
I'm just concerned that if we expose a public APIs, it'll be extremely difficult to change or remove it later, just my personal take about the dtls 1.3 suffix, maybe a sub package? what do you think? |
|
@JoeTurki thanks! I agree that we should keep the API private until the DTLS 1.3 implementation is ready; we should only make it public as the last thing to do. If that is what you meant by it? Regarding the sub-package or suffix: It depends. Using a sub-package I am afraid to loose access to some private fields in structs or functions that can be valuable for the implementation. Using a suffix, we can move fast without those problems, but it will be a bit messy file-wise (especially with flights). Will definitely have another look to see what's possible. I think a combination might be a good solution. |
Yeah this will be a good call, private or sub package, but private will be better, I agree , for example: if we expose |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #738 +/- ##
==========================================
- Coverage 79.13% 76.93% -2.21%
==========================================
Files 102 105 +3
Lines 6917 7271 +354
==========================================
+ Hits 5474 5594 +120
- Misses 1068 1293 +225
- Partials 375 384 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
I have made a WIP DTLS 1.3 configuration and architecture.
As suggested by @JoeTurki, it implementes a functional options pattern to provide flexibility in the future. A DTLS 1.3 configuration is created with
NewConfigVersion13(c Config, opts ...OptionVersion13) (*Config, error)where an option/config can be implemented like this:The codebase for DTLS 1.2 and DTLS 1.3 splits off in
conn.gowith the newhandshake13function and the new handshakeFSM inhandshaker_13.go(note that neither reflects DTLS 1.3 logic yet, just a copy/paste). I suggest we split off as much code as possible suffixed with_13(flight0handler_13.go etc...), to keep the development of DTLS 1.3 separate from 1.2.This PR contains a test of enabling DTLS 1.3 and verifies that an error is returned correctly, as we have not yet started to implement DTLS 1.3 flights.
I would appreciate some input from other maintainers on this! @JoeTurki, @daenney, @Sean-Der.
Reference issue
Fixes #731