Skip to content

Commit

Permalink
Add links from tests to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
scouten-adobe committed Feb 27, 2025
1 parent 674bbd6 commit 1592e18
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cawg_identity/src/tests/identity_assertion/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
// each license.

mod signer_payload;
mod validation_errors;
mod validation_method;
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
// specific language governing permissions and limitations under
// each license.

//! This test suite checks the enforcement of generic identity assertion validation as described in [§7.1, Validation method].
//!
//! IMPORTANT: The CAWG SDK does not currently support the optional fields named
//! * `expected_partial_claim`
//! * `expected_claim_generator`
//! * `expected_countersigners`
//!
//! [§7.1, Validation method]: https://cawg.io/identity/1.1-draft/#_validation_method
use std::io::Cursor;

use c2pa::Reader;
Expand All @@ -27,6 +36,15 @@ use crate::IdentityAssertion;
)]
#[cfg_attr(target_os = "wasi", wstd::test)]
async fn malformed_cbor() {
// An identity assertion MUST contain a valid CBOR data structure that contains
// the required fields as documented in the identity rule in [Section 5.2, “CBOR
// schema”]. The `cawg.identity.cbor.invalid` error code SHALL be used to report
// assertions that do not follow this rule. A validator SHALL NOT consider any
// extra fields not documented in the `identity` rule during the validation
// process.
//
// [Section 5.2, “CBOR schema”]: https://cawg.io/identity/1.1-draft/#_cbor_schema

let format = "image/jpeg";
let test_image = include_bytes!("../fixtures/validation_errors/malformed_cbor.jpg");

Expand Down

0 comments on commit 1592e18

Please sign in to comment.