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? |
|
@JoTurk 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
❌ Your patch check has failed because the patch coverage (47.26%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #738 +/- ##
==========================================
- Coverage 82.44% 81.72% -0.73%
==========================================
Files 121 124 +3
Lines 6928 7049 +121
==========================================
+ Hits 5712 5761 +49
- Misses 805 874 +69
- Partials 411 414 +3
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:
|
db2146f to
ab5351d
Compare
|
The goal here is not to be complete, but to provide a best-effort skeleton with my current understanding of how the DTLS 1.3 implementation would look. I still think the |
c0e5c02 to
6ccf8fb
Compare
e7ffc5e to
0fe7f8f
Compare
|
The config is split to another PR #823 |
a1ab03b to
fef8e50
Compare
|
There are some TODOs here, but they are mainly regarding the new record demultiplexing. This is addressed in #793. This PR is not supposed to be complete, but the changes are private so we can get it merged to unblock working on the DTLS 1.3 implementation further. It will affect #766 |
Description
I have made a WIP DTLS 1.3
configurationand architecture.As suggested by @JoTurk, it implementes a functional options pattern to provide flexibility in the future. A DTLS 1.3 configuration is created withNewConfigVersion13(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 new. I suggest we split off as much code as possible suffixed withhandshake13function and the new handshakeFSM inhandshaker_13.go(note that neither reflects DTLS 1.3 logic yet, just a copy/paste)_13to 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! @JoTurk, @daenney, @Sean-Der.
Reference issue
Fixes #731