Skip to content

fix: Missing symbol from native lib #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 19, 2025
Merged

Conversation

tmathern
Copy link
Collaborator

@tmathern tmathern commented Jun 19, 2025

#122

Fix missing symbol (+add missing test coverage).

@tmathern tmathern self-assigned this Jun 19, 2025
@tmathern tmathern requested review from gpeacock, dyro and ok-nick June 19, 2025 20:23
Copy link
Contributor

@gpeacock gpeacock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can simplify this if we don't return the length of sign_file.
We can follow up later when we export the real sign_file function - it adds features like reading sidecars.

@tmathern tmathern merged commit b13fdd0 into main Jun 19, 2025
19 checks passed
@tmathern tmathern deleted the mathern/fix-missing-symbol branch June 19, 2025 23:11
_lib.c2pa_manifest_bytes_free(manifest_bytes_ptr)

return manifest_bytes
return result
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how are we going to return the manifest bytes if we throw them away here?

Copy link
Contributor

@gpeacock gpeacock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this was already merged, but I there are things that need to be fixed

Returns:
A tuple of (size of C2PA data, optional manifest bytes)
Size of C2PA data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign_file needs to return manifest_bytes so that they can be used for sidecar or uploading remote manifests.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of returning the size of the manifest_bytes here?


# Use the sign_file method
builder = Builder(self.manifestDefinition)
result = builder.sign_file(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This result should be manifest_bytes. Errors should throw.

@@ -322,13 +322,13 @@ def test_remote_sign(self):
builder = Builder(self.manifestDefinition)
builder.set_no_embed()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typically remote signing would also set_remote_url() If remote fetch is disabled the reader will return an error indicating the RemoteUrl that should be read from. Setting no_embed on its own is mainly there for writing sidecars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants