Skip to content

test: build against c2pa-rs PR #2231 (split-out c2pa-raw-crypto) - #130

Open
scouten-adobe wants to merge 4 commits into
mainfrom
test-c2pa-rs-2231
Open

test: build against c2pa-rs PR #2231 (split-out c2pa-raw-crypto)#130
scouten-adobe wants to merge 4 commits into
mainfrom
test-c2pa-rs-2231

Conversation

@scouten-adobe

@scouten-adobe scouten-adobe commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

⚠️ Not for merge

This PR exists to run CI against contentauth/c2pa-rs#2231 ("Split out c2pa-raw-crypto, take 2"). It must not be merged until that c2pa-rs change is released to crates.io.

What this does

  • Points the workspace c2pa dependency at the c2pa-rs PR branch via a git reference (branch = "split-out-c2pa-raw-crypto-take-2") in Cargo.toml. Cargo.lock pins the current branch HEAD; the cargo build steps don't use --locked, so CI re-resolves.
  • packages/c2pa-types/index.ts: SigningAlg now lives in the new c2pa_raw_crypto crate, which deliberately does not depend on schemars. The generated JSON schema therefore exposes a mirror type SigningAlgSchema (identical serialized variants) instead of SigningAlg. index.ts re-exports it under the original public name, so the public TypeScript API is unchanged.
  • packages/c2pa-node (replays contentauth/c2pa-node-v2#69, now that c2pa-node-v2 has been migrated into this monorepo): the split removes the c2pa::crypto::raw_signature module (AsyncRawSigner, RawSigner, RawSignerError) and the AsyncSigner::async_raw_signer() hook. Accordingly:
    • removes the now-redundant AsyncRawSigner / RawSigner impls and the async_raw_signer() / as_raw_signer() overrides from both NeonCallbackSigner and NeonIdentityAssertionSigner, keeping only their complete public AsyncSigner impls;
    • rewrites NeonIdentityAssertionSigner::certs() to use AsyncSigner::certs() instead of the removed raw cert_chain();
    • refreshes the stale Send/Sync doc comments that referenced AsyncRawSigner (including neon_credential_holder.rs).
    • No behavior change: the async JS signing callback path is preserved, now driven through AsyncSigner::sign.

This branch has been brought up to date with main (which migrated c2pa-node-v2 in as packages/c2pa-node), and c2pa-rs#2231 has likewise been updated to current c2pa-rs main (now c2pa 0.88.0 + the crate split).

Before merge (once c2pa-rs is released)

  • Replace the git reference in Cargo.toml with the published crates.io version (currently c2pa = { version = "=0.88.0", ... }).
  • The index.ts and packages/c2pa-node source changes stay — the crate split is permanent.

Verification (local)

  • cargo build (wasm32) for c2pa-wasm against the PR branch
  • cargo build for c2pa-node against the PR branch
  • nx build for c2pa-types, c2pa-wasm, c2pa-web (from the original run)
  • nx lint (0 errors, from the original run)

Notes

  • All five features in use (pdf, rust_native_crypto, fetch_remote_manifests, json_schema, http_reqwest) still exist in the PR.
  • c2pa-wasm / c2pa-node compile with deprecation warnings from c2pa-rs's new Context-based API (Builder::from_archive, Settings::from_string, etc.) — non-blocking; worth a follow-up migration. (c2pa-rs#2206's removal of long-deprecated APIs does not affect any code here.)

🤖 Generated with Claude Code

Point the workspace `c2pa` dependency at the c2pa-rs PR branch via a git
reference so CI can build against it. The lockfile is intentionally not
pinned, so each CI run re-resolves the branch HEAD.

PR #2231 moves `SigningAlg` into the new `c2pa_raw_crypto` crate, which does
not depend on `schemars`. The generated JSON schema therefore exposes a mirror
type `SigningAlgSchema` (identical serialized variants) instead of `SigningAlg`,
so re-export it under the original public name in c2pa-types.

NOT FOR MERGE until the c2pa-rs change is released; then bump `c2pa` back to a
published crates.io version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3a55f70

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@contentauth/c2pa-node Patch
@contentauth/c2pa-types Patch
@contentauth/c2pa-web Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cdmurph32

Copy link
Copy Markdown
Contributor

LGTM. You just need to run pnpm changeset and add the changeset.

scouten-adobe and others added 2 commits June 19, 2026 14:51
Replays contentauth/c2pa-node-v2#69 into packages/c2pa-node, now that
c2pa-node-v2 has been migrated into this monorepo.

The c2pa-raw-crypto split (c2pa-rs#2231) removes the
c2pa::crypto::raw_signature module (AsyncRawSigner, RawSigner,
RawSignerError) and the AsyncSigner::async_raw_signer() hook. The SDK
now adapts any public AsyncSigner into its internal COSE signing layer
directly, so a caller-supplied raw signer is no longer needed.

- Remove the AsyncRawSigner / RawSigner impls and async_raw_signer() /
  as_raw_signer() hooks from NeonCallbackSigner and
  NeonIdentityAssertionSigner, keeping their complete AsyncSigner impls.
- Rewrite NeonIdentityAssertionSigner::certs() to use AsyncSigner::certs()
  instead of the removed raw cert_chain().
- Refresh stale Send/Sync doc comments that referenced AsyncRawSigner
  (including neon_credential_holder.rs).
- Re-pin the c2pa git-branch dependency in Cargo.lock to the updated
  split branch HEAD (0.88.0).

No behavior change: the async JS signing callback path is preserved,
now driven through AsyncSigner::sign.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

4 participants