-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Merging internal commits for release/8.0 #124237
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
Merging internal commits for release/8.0 #124237
Conversation
CoseMessage's Decode routines say that any failure is a CryptographicException, but some of the validation failures leak out ArgumentException from the validation in CoseHeaderMap.
…-merge-8.0-2026-02-10-1100
|
Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security |
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.
Pull request overview
This PR merges internal release/8.0 changes into the COSE implementation, primarily improving decode behavior for indefinite-length CBOR structures and tightening critical header validation, with accompanying test coverage.
Changes:
- Update COSE header map decoding to support indefinite-length CBOR maps and improve error surfacing for well-known header validation failures.
- Update critical headers handling to properly process indefinite-length arrays and reject empty
critarrays. - Add decode tests for critical header error cases across Sign1 and MultiSign, including detached/attached and definite/indefinite encodings.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.Sign.CustomHeaderMaps.cs | Expands signing tests to cover definite vs indefinite critical header encodings (but currently has invalid argument ordering at call sites). |
| src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.DecodeSign1.cs | Adds decode tests validating exceptions for missing/empty/invalid critical headers across encoding variants. |
| src/libraries/System.Security.Cryptography.Cose/tests/CoseMessageTests.DecodeMultiSign.cs | Adds decode tests validating exceptions for missing/empty/invalid critical headers across encoding variants. |
| src/libraries/System.Security.Cryptography.Cose/src/System/Security/Cryptography/Cose/CoseMessage.cs | Updates header bucket decoding to handle indefinite-length maps; improves critical header parsing and exception behavior. |
| src/libraries/System.Security.Cryptography.Cose/src/System.Security.Cryptography.Cose.csproj | Bumps servicing version and changes package generation behavior on build. |
No description provided.