Skip to content

Commit 98dee9d

Browse files
committed
fix: Update signing
1 parent b63f79a commit 98dee9d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/c2pa/c2pa.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ def _sign_internal(
18521852
signer: Signer,
18531853
format: str,
18541854
source_stream: Stream,
1855-
dest_stream: Stream) -> tuple[int, bytes]:
1855+
dest_stream: Stream) -> bytes:
18561856
"""Internal signing logic shared between sign() and sign_file() methods,
18571857
to use same native calls but expose different API surface.
18581858
@@ -1946,7 +1946,7 @@ def sign_file(self,
19461946
Path],
19471947
dest_path: Union[str,
19481948
Path],
1949-
signer: Signer) -> tuple[int, bytes]:
1949+
signer: Signer) -> bytes:
19501950
"""Sign a file and write the signed data to an output file.
19511951
19521952
Args:

test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python3 ./tests/test_unit_tests.py

tests/test_unit_tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,6 +1568,8 @@ def test_sign_file(self):
15681568
"name": "python_internals_test",
15691569
"version": "0.0.1",
15701570
}],
1571+
# Claim version has become mandatory for signing v1 claims
1572+
"claim_version": 1,
15711573
"format": "image/jpeg",
15721574
"title": "Python Test Signed Image",
15731575
"ingredients": [],

0 commit comments

Comments
 (0)