-
Notifications
You must be signed in to change notification settings - Fork 4
Add OSCORE Support #47
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
Conversation
…ons to add oscore conf to context for servers and to add new recipients
…on-volatile storage
…ence_number() using Option and pattern-matching
…dd_oscore_conf() is deprecated
…of OscoreConf & OscoreRecipient
…o it's raw struct)
…formation has been added to the context
…ep track of its pointer
Workflow Status ReportGenerated for commit 0a33cbf on Tue Aug 5 21:14:01 UTC 2025. In case of failure, clippy warnings and rustfmt changes (if any) will be indicated as CI check warnings in the file comparison view. Documentation: Download Coverage Report: Download Note: Online versions of documentation and coverage reports may not be available indefinitely, especially after the pull request was merged. Code Coverage ReportCoverage target is 80%. Expand to view coverage statistics
Total coverage: 53.23% |
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.
Hi, thanks for the contribution!
You can find my initial comments below.
Regarding the examples: Would it be possible to add an abridged version of the examples (without the EDHOC part) to the examples
subdirectory or to the module-level rustdoc in oscore.rs
?
That way, we can use those as (no_run
) tests.
Lastly, it would also be nice if we had a runnable test case that runs both a server and a client and performs a basic request, akin to the test cases already present for UDP and DTLS.
Co-authored-by: Hugo Hakim Damer <pulsastrix@pstrx.de>
Co-authored-by: Hugo Hakim Damer <pulsastrix@pstrx.de>
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.
Sorry for the long wait, I was a bit preoccupied with finishing my thesis 😅.
Here is my second review of this PR, most of these comments are just minor optimizations and stuff regarding memory leaks.
- comments cleaned up and corrected - avoid an unnecessary copy operatorion in delete_oscore_recipient(...) - preserve the original error during type conversion for the OscoreConfigError - reduced visibility of initial_recipient field in OscoreConf struct - improved Drop trait and into_raw_conf(...) implementations (wip) Co-authored-by: Hugo Hakim Damer <pulsastrix@pstrx.de>
Thank you for your suggestions and please excuse my delayed response. Apart from the improvement for |
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.
Thank you for your suggestions and please excuse my delayed response.
No problem, thanks again for your work on this.
Apart from the improvement for save_seq_num_func, these issues should now be resolved.
LGTM! (aside from the comments that were moved to/will be addressed in separate issues)
This pull request aims to provide support for OSCORE in libcoap-rs.
It adds a new feature flag "oscore" which has to be activated to enable all functions regarding OSCORE under which we provide the following:
We introduced two new structs OscoreConf and OscoreRecipient which are currently located within oscore.rs.
We also added new errors to allow for error-handling by the user in errors.rs.
There is also a minimal client and server example available, deriving from the official documentation.
Security was a priority and all unsafe calls have been annotated with an appropriate security notice, as is the standard for this project.