pkg/tinydtls: enforce the default dtls user params to be configurable#20478
Merged
benpicco merged 2 commits intoRIOT-OS:masterfrom Mar 27, 2024
Merged
Conversation
leandrolanzieri
previously requested changes
Mar 18, 2024
Contributor
leandrolanzieri
left a comment
There was a problem hiding this comment.
Thanks for this. I think this should be better off as a tinydtls configuration. For this I'd suggest to contribute the introduction of macros upstream. If, for now, you still want to contribute the patch to RIOT, please check my other comment about making the macros generic.
pkg/tinydtls/patches/0001-build-pkg-tinydtls-make-the-usage-of-extended-master.patch
Outdated
Show resolved
Hide resolved
Contributor
|
tinyDTLS is usually pretty good with incorporating our changes upstream, so you might want to directly open a PR in their repo to keep the patches to the pkg to a minimum. |
Contributor
Author
|
I'll open a PR in tinydtls repo |
76fa9db to
a734c23
Compare
Contributor
Author
|
I have opened a PR in tinydtls, and they have suggested to adjust the default params via get_user_params() cb. |
benpicco
reviewed
Mar 22, 2024
Contributor
|
That's also a good solution. |
a734c23 to
208e757
Compare
Contributor
|
@leandrolanzieri please link |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
Incorporating the tinydtls build package, this code addresses a failure encountered during the DTLS handshake between the client and the server. The issue arose from the client imposing default user parameters, which mandate setting extended master secret and renegotiation info to 1. However, not all servers support these extensions. To ensure greater flexibility, it's more appropriate to make these parameters user-configurable
Testing procedure
I utilized the 'examples/gcoap_dtls' on a native environment for the client. However, for the server, I deployed it on my Ubuntu machine, which lacks support for these extensions
results when the extensions are set to 0:
results when the extensions are set to 1: