Add supported_versions extension feature from DTLS v1.3#730
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #730 +/- ##
==========================================
+ Coverage 78.59% 78.64% +0.04%
==========================================
Files 101 102 +1
Lines 6830 6916 +86
==========================================
+ Hits 5368 5439 +71
- Misses 1087 1098 +11
- Partials 375 379 +4
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:
|
555d156 to
e0c1726
Compare
There was a problem hiding this comment.
@philipch07 Thanks for diving into this extension so fast!
Removing the Selected field should simplify this implementation + tests a bit.
Additionally, we should check upon unmarshaling if the parsed major/minor version is supported by us, i.e is it one of version vars defined in version.go. We should discard versions not supported and only append supported versions.
For discarding, I think this can cause an unmatched value with marshalling and unmarshalling: for example, lets say the list passed in is: [ Then it would be marshalled (and later unmarshalled) as: [ Which is no longer the same as the original input. Is that behavior still desirable? I'm not sure if it causes any issues, but it was just something that I noticed. (Also thanks for reviewing so quickly! I really appreciate the quick feedback!) |
e0c1726 to
fa1758b
Compare
fa1758b to
41ae364
Compare
41ae364 to
0d2ee7d
Compare
theodorsm
left a comment
There was a problem hiding this comment.
Would be nice with a test case with some non-existent version values too (ex: 0xef, 0x0d)
a8408e5 to
d5947c4
Compare
|
I added the missing extension type bytes in my commit. @philipch07, thank you so much for taking on this implementation and being patient with feedback! |
Co-authored-by: theodorsm <theodor@midtlien.com>
d54c125 to
f6b0286
Compare
|
@philipch07 @theodorsm feel free to merge it, if it's ready :) |
|
Thanks @theodorsm and @joeturki for the feedback, fixing it up, and merging! Sorry I didn't see the messages earlier as I'm currently at work. I'm looking forward to the next tasks! |
Description
This adds the
supported_versionsextension feature in accordance with DTLS v1.3 section 5.3. Note that it links to TLS 1.3 section 4.2.1.Reference issue
Completes #729