Skip to content

SPEC-046: readVerified(), the verifier's report of the same read - #199

Merged
Maurice1969DB merged 1 commit into
mainfrom
spec-046-verifier-report
Oct 29, 2026
Merged

Maurice1969DB merged 1 commit into
mainfrom
spec-046-verifier-report

Conversation

@Maurice1969DB

Copy link
Copy Markdown
Contributor

SPEC-046. C2paVerifierReader::readVerified() returns a VerifiedRead: the ManifestReport and the verifier's own VerificationReport of one and the same verify() call. The evidence a caller keeps ($read->verification->evidenceToJson()) is then the evidence of the verdict it shows. Calling the verifier a second time would be a second read, at another moment, and a revocation answer or the clock may differ.

  • The reader takes an optional, already configured Verifier, such as one with a revocation source. Without one it builds new Verifier as before.
  • Trust settings may also be the verifier's TrustSettings object. With TrustSettings::fromTrustLists() the evidence names the lists a verdict was judged against; a settings document names none.
  • read() is unchanged; it is readVerified()->report. A refused or unreadable asset throws the same ReadFailedException from both.
  • The verifier range moves to ^0.10 (conflict <0.10 || >=0.11; SPEC-042 Amendment 11, ADR-0007 addendum). The evidence document exists from verifier 0.10 on.
  • Fixtures are copied from the verifier's revocation probes: a throw-away root, a file signed under it, and the signer's good OCSP response. tests/Fixtures/spec046-README.md names their source and SHA-256. No key is in the repository.

Measured

  • With verifier 0.10.0 installed and nothing else changed, composer check had one failure: the old range pin, as expected.
  • After the change:
    • composer check: 528 passed, 7 skipped. PHPStan, Pint and Deptrac were clean.
    • php bin/spec-check.php: 0 errors.
  • The integration tests that use the verifier ran against a local service: 52 passed, 4 skipped, as with 0.9.0. The skipped ones need the SPEC-043 probe profile.
  • The new range pin was seen red on the old composer.json. 8 of the 9 SPEC-046 tests were red before the implementation.
  • The AC8 test was green before the implementation, because PHP already refused a non-string. The spec's Traceability says so.
  • With a revocation source, the verifier asks it twice per read: about the intermediate, then about the signer. AC1 pins both requests.

Reasoned

  • VerifiedRead names a verifier class in its signature. PHP loads that class only when it is used, so a host without the verifier is unaffected (ADR-0007).

The release that carries this is 0.20.0, a minor: the range narrows and a method and a class are added.

C2paVerifierReader::readVerified() returns a VerifiedRead: the
ManifestReport and the verifier's VerificationReport of one verify() call,
so the evidence a caller keeps is that of the verdict it shows. The reader
takes an optional, already configured Verifier, and the trust settings
also as the verifier's TrustSettings object, so fromTrustLists() names the
lists in the evidence. read() is unchanged.

The verifier range moves to ^0.10 (SPEC-042 Amendment 11, ADR-0007
addendum): the evidence document exists from verifier 0.10 on. Fixtures
copied from the verifier's revocation probes, with a README naming their
source and hashes.
@Maurice1969DB
Maurice1969DB merged commit d81e9f9 into main Oct 29, 2026
20 checks passed
@Maurice1969DB
Maurice1969DB deleted the spec-046-verifier-report branch October 29, 2026 19:04
@Maurice1969DB Maurice1969DB mentioned this pull request Oct 29, 2026
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.

1 participant