Skip to content

Conversation

@vseanreesermsft
Copy link

No description provided.

Copilot AI review requested due to automatic review settings February 10, 2026 19:01
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a 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 crit arrays.
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Security Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants