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 API to allow setting unprotected headers #6586

Merged
merged 22 commits into from
Oct 24, 2024

Conversation

achamayou
Copy link
Member

@achamayou achamayou commented Oct 22, 2024

Add ccf::cose::edit::set_unprotected_header() API, to allow injection of proofs in signatures, and of receipts in signed statements.

Note that this does not preserve existing unprotected header parameters, because I could not find a way to make edits without fully parsing it to an intermediary representation, and re-emitting it with QCBOR. Aside from being quite a lot of code parsing unauthenticated input, this would almost certainly lossy because of variable length encoding used in CBOR, and would in any case not provide any functionality that cannot be implemented on the client side.

@achamayou achamayou requested a review from a team October 22, 2024 16:52
@maxtropets maxtropets marked this pull request as draft October 22, 2024 16:55
@achamayou achamayou changed the title [Draft] add API to allow unprotected header editing Add API to allow setting unprotected headers Oct 24, 2024
@achamayou achamayou marked this pull request as ready for review October 24, 2024 12:34
CMakeLists.txt Outdated Show resolved Hide resolved
src/crypto/cose.cpp Outdated Show resolved Hide resolved
Co-authored-by: Max <maxtropets@gmail.com>
@achamayou achamayou enabled auto-merge October 24, 2024 14:35
@achamayou achamayou added this pull request to the merge queue Oct 24, 2024
@maxtropets maxtropets added the run-long-test Run Long Test job label Oct 24, 2024
Merged via the queue into microsoft:main with commit 1bf76dd Oct 24, 2024
21 checks passed
@achamayou achamayou deleted the cose_edit branch October 24, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-long-test Run Long Test job
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants