CML
    Preparing search index...

    Function validateC2paInitSegment

    • Validates a C2PA init segment: parses the manifest, extracts and verifies the certificate, validates the BMFF hard binding hash, verifies all session keys from the c2pa.session-keys assertion, and performs manifest integrity checks (assertion hashes, missing assertions, action ingredients, and claim signature verification).

      Only session keys with a valid signer binding and an unexpired validity period are included in the result.

      Parameters

      Returns Promise<InitSegmentValidation>

      Structured validation result (with INIT_INVALID error code if mdat box is present)

      If no C2PA UUID box is found

      it('throws for empty bytes (no C2PA UUID box)', async () => {
      await rejects(
      () => validateC2paInitSegment(new Uint8Array(0)),
      /No C2PA UUID box/,
      )
      })