Repository navigation
SPEC-046: readVerified(), the verifier's report of the same read - #199
Merged
Merged
Conversation
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.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SPEC-046.
C2paVerifierReader::readVerified()returns aVerifiedRead: theManifestReportand the verifier's ownVerificationReportof one and the sameverify()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.Verifier, such as one with a revocation source. Without one it buildsnew Verifieras before.TrustSettingsobject. WithTrustSettings::fromTrustLists()the evidence names the lists a verdict was judged against; a settings document names none.read()is unchanged; it isreadVerified()->report. A refused or unreadable asset throws the sameReadFailedExceptionfrom both.^0.10(conflict<0.10 || >=0.11; SPEC-042 Amendment 11, ADR-0007 addendum). The evidence document exists from verifier 0.10 on.tests/Fixtures/spec046-README.mdnames their source and SHA-256. No key is in the repository.Measured
composer checkhad one failure: the old range pin, as expected.composer check: 528 passed, 7 skipped. PHPStan, Pint and Deptrac were clean.php bin/spec-check.php: 0 errors.composer.json. 8 of the 9 SPEC-046 tests were red before the implementation.Reasoned
VerifiedReadnames 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.