```` try: signer_info = C2paSignerInfo( alg=b"ps256", sign_cert=cert_chain, private_key=private_key, ta_url=b"http://timestamp.digicert.com" ) signer = Signer.from_info(signer_info) except Exception as e: logger.error(f"Error creating signer: {e}") raise RuntimeError(f"Error creating signer: {e}") from e logger.info(f"signer created in {time.time()} duration {time.time() - starttime}") # Create a builder add a thumbnail resource and an ingredient file. builder = Builder(manifest) with open(image_path, "rb") as source_file, open(output_path, "wb") as dest_file: manifest_bytes = builder.sign(signer, mime_type, source_file, dest_file) ```` error message is "{ "detail": "error while attaching c2pa metadata: Other: hash verification( Asset hash failure: assertion.bmffHash.mismatch )" } test data: https://github.com/user-attachments/assets/f49d6103-f0ba-4190-8210-a111cc6aa18f
Activity
tmathern commentedon Sep 17, 2025
The new versions of the SDK do some additional checks on the signed files. So they need to be able to read it back.
If you change that line:
to
then it will work.
(note the
w+bon the destination file)