Skip to content
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

Add parser/dresser for naked COSE keys #341

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

chrysn
Copy link
Collaborator

@chrysn chrysn commented Feb 3, 2025

Implements #336, and refactors the parse_ccs() function, broadening the range of accepted items.

Closes: #336

@@ -359,6 +312,103 @@ impl Credential {
}
}

/// Parse a COSE Key, accepting only understood fields.
///
/// This takes a decoder rather than a slice because this enables a naked decoder to asset that
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to assert* ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.

@geonnave
Copy link
Collaborator

geonnave commented Feb 3, 2025

Looks good to me, left just a minor comment, then I am ready to merge.

This allows processing some generally valid cases that could not be
processed before, eg. CCSs without a KID.
@geonnave geonnave merged commit 977d352 into openwsn-berkeley:main Feb 5, 2025
37 checks passed
@chrysn chrysn deleted the feature-336 branch February 5, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: Directly ingest naked COSE key
2 participants