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.
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
sock_dtls: move common code into sock_dtls_establish_session() #19142
sock_dtls: move common code into sock_dtls_establish_session() #19142
Changes from all commits
4676472
5134b5c
df4ef80
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benpicco: the
credman_delete(creds_tag, creds_type);
got removed from line 184 maybe we need that in l. 206 if the connection could not be established since in that case it would not be closed -> that credman slot would be taken until reboot.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of what I thought here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missed that
but somehow i am still not fully convinced maybe the
credman_delete
in_close_session
is also wrongThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe that whole file should never call any credman function (but find or get) since the add should be done in another part of RIOT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
credman is weird - it's true that the credentials are only stored for the lifetime of the session.
Since they are added in
_connect_server()
they should also be removed if_connect_server()
fails - unless they were already added to credman before.Same goes for
_close_session()
.Now what I don't get is why credman is needed at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems more like it is not used as intended
intention:
init:
add all your creeds to credman
connect:
use a cred by tag
done here:
connect
add this creed to credman
use the cred just added
but there where applications before that that did the credential handling themself and these are now add cred to credman
and that use the cred
if we use it as intended we would just have one place where all the creds are managed this would make the review of the creds on a device simpler)
seems like the move to cred man is just incomplete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#11564 (comment)
there is the reasoning why credman and not just a pointer to credentials