Repository navigation
Conversation
…o load the manifest When an identity assertion did not match the identity CDDL (for example, signer_payload missing), Manifest::from_store propagated the decode error, so the Reader dropped the whole manifest and logged a generic assertion.required.missing "Failed to load manifest" failure. No cawg.identity.cbor.invalid was reported. CAWG Identity Assertion 1.3 §7.1 step 1 requires cawg.identity.cbor.invalid for this case, scoped to the identity assertion. Log that failure, keep the undecoded assertion, and continue loading the manifest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2884.
Changes in this pull request
When an identity assertion doesn't match the identity CDDL, the whole manifest is rejected. An example is the bundled
validation_method/malformed_cbor.jpg, wheresigner_payloadis missing.In
Manifest::from_store,ma.to_assertion::<IdentityAssertion>()?returns the decode error.Reader::from_storethen drops the whole manifest and logs one generic failure against it:{ "code": "assertion.required.missing", "url": "self#jumbf=/c2pa/…", "explanation": "Failed to load manifest" }No
cawg.identity.cbor.invalidis reported, and none of the manifest's other assertions are available.CAWG Identity Assertion 1.3 §7.1 step 1 says to confirm the assertion matches the
identityCDDL, and to reportcawg.identity.cbor.invalidif it doesn't. That code is scoped to the identity assertion, like the other §7.1 failures.Fix: if decoding fails:
cawg.identity.cbor.invalidagainst the identity assertion's URI, with the same description and error asIdentityAssertion::from_manifestusesTests:
malformed_identity_assertion_reports_cbor_invalidreadsmalformed_cbor.jpgand checks three things:cawg.identity.cbor.invalidis reported with a URL ending in/c2pa.assertions/cawg.identityassertion.required.missingisn't reportedIt fails without the fix, and passes with OpenSSL and with
rust_native_crypto.cargo test -p c2pa --lib --features file_iopasses, and Clippy is clean.Conformance results
Found with a CAWG identity assertion conformance suite I'm building; it's not public yet. Its
cbor_invalidcase (the bundledmalformed_cbor.jpg) now passes.Checklist
TO DOitems (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment. (No new TODO items.)🤖 Generated with Claude Code