|
43 | 43 |
|
44 | 44 | _DST_COMPOSITE = "http://cv.iptc.org/newscodes/digitalsourcetype/compositeWithTrainedAlgorithmicMedia" |
45 | 45 |
|
| 46 | +# c2pa-rs >= 0.91 rejects manifests whose first action is not created or opened. |
| 47 | +_CREATED_ACTION = { |
| 48 | + "action": "c2pa.created", |
| 49 | + "softwareAgent": {"name": "perf_test"}, |
| 50 | + "digitalSourceType": "http://cv.iptc.org/newscodes/digitalsourcetype/digitalCreation", |
| 51 | +} |
| 52 | + |
46 | 53 | _PARENT_ID = "xmp:iid:aaaaaaaa-0001-0001-0001-aaaaaaaaaaaa" |
47 | 54 | _PLACED_ID = "xmp:iid:bbbbbbbb-0002-0002-0002-bbbbbbbbbbbb" |
48 | 55 | _PARENT_ID2 = "xmp:iid:cccccccc-0003-0003-0003-cccccccccccc" |
@@ -307,7 +314,7 @@ def scenario_builder_sign_jpeg_component_of(iterations: int = 100) -> None: |
307 | 314 | "ingredients": [{"format": "image/jpeg", "relationship": "componentOf", "instance_id": _PLACED_ID}], |
308 | 315 | "assertions": [{ |
309 | 316 | "label": "c2pa.actions.v2", |
310 | | - "data": {"actions": [{ |
| 317 | + "data": {"actions": [_CREATED_ACTION, { |
311 | 318 | "action": "c2pa.placed", |
312 | 319 | "softwareAgent": {"name": "perf_test"}, |
313 | 320 | "parameters": {"ingredientIds": [_PLACED_ID]}, |
@@ -411,7 +418,7 @@ def scenario_builder_sign_jpeg_two_components_same_mime(iterations: int = 100) - |
411 | 418 | **MANIFEST_BASE, |
412 | 419 | "assertions": [{ |
413 | 420 | "label": "c2pa.actions.v2", |
414 | | - "data": {"actions": [{ |
| 421 | + "data": {"actions": [_CREATED_ACTION, { |
415 | 422 | "action": "c2pa.placed", |
416 | 423 | "softwareAgent": {"name": "perf_test"}, |
417 | 424 | "parameters": {"ingredientIds": [_PLACED_ID4, _PLACED_ID5]}, |
@@ -441,7 +448,7 @@ def scenario_builder_sign_jpeg_two_components_mixed_mime(iterations: int = 100) |
441 | 448 | **MANIFEST_BASE, |
442 | 449 | "assertions": [{ |
443 | 450 | "label": "c2pa.actions.v2", |
444 | | - "data": {"actions": [{ |
| 451 | + "data": {"actions": [_CREATED_ACTION, { |
445 | 452 | "action": "c2pa.placed", |
446 | 453 | "softwareAgent": {"name": "perf_test"}, |
447 | 454 | "parameters": {"ingredientIds": [_PLACED_ID4, _PLACED_ID5]}, |
@@ -836,7 +843,7 @@ def scenario_builder_sign_jpeg_two_ingredient_archives(iterations: int = 100) -> |
836 | 843 | **MANIFEST_BASE, |
837 | 844 | "assertions": [{ |
838 | 845 | "label": "c2pa.actions.v2", |
839 | | - "data": {"actions": [{ |
| 846 | + "data": {"actions": [_CREATED_ACTION, { |
840 | 847 | "action": "c2pa.placed", |
841 | 848 | "softwareAgent": {"name": "perf_test"}, |
842 | 849 | "parameters": {"ingredientIds": [_ARCH_COMP_ID, _ARCH_COMP_ID2]}, |
|
0 commit comments