Module validation_codes

Source
Expand description

Implements validation status for specific parts of a manifest.

See §15.2.1, “Standard Status Codes.”

Constants§

ACTION_ASSERTION_INGREDIENT_MISMATCH
An action that requires an associated ingredient either does not have one or the one specified cannot be located
ACTION_ASSERTION_REDACTED
An action assertion was redacted when the ingredient’s claim was created.
ALGORITHM_UNSUPPORTED
The value of an alg header, or other header that specifies an algorithm used to compute the value of another field, is unknown or unsupported.
ASSERTION_ACCESSIBLE
A non-embedded (remote) assertion was accessible at the time of validation.
ASSERTION_BMFFHASH_MATCH
Hash of a box-based asset matches the hash declared in the BMFF hash assertion.
ASSERTION_BMFFHASH_MISMATCH
The hash of a box-based asset does not match the hash declared in the BMFF hash assertion.
ASSERTION_BOXHASH_MATCH
Hash of a box-based asset matches the hash declared in the General Box Hash assertion.
ASSERTION_BOXHASH_MISMATCH
The hash of a box-based asset does not match the hash declared in the General Boxes hash assertion.
ASSERTION_BOXHASH_UNKNOWN
The hash of a box-based asset does not contain boxes in the expected order for the General Boxes hash assertion.
ASSERTION_CBOR_INVALID
The cbor of an assertion is not valid.
ASSERTION_CLOUD_DATA_ACTIONS
An update manifest contains a cloud data assertion referencing an actions assertion.
ASSERTION_CLOUD_DATA_HARD_BINDING
A hard binding assertion is in a cloud data assertion.
ASSERTION_DATAHASH_MATCH
Hash of a byte range of the asset matches the hash declared in the data hash assertion.
ASSERTION_DATAHASH_MISMATCH
The hash of a byte range of the asset does not match the hash declared in the data hash assertion.
ASSERTION_HASHEDURI_MATCH
The hash of the the referenced assertion in the ingredient’s manifest matches the corresponding hash in the assertion’s hashed URI in the claim.
ASSERTION_HASHEDURI_MISMATCH
The hash of the the referenced assertion in the manifest does not match the corresponding hash in the assertion’s hashed URI in the claim.
ASSERTION_INACCESSIBLE
A non-embedded (remote) assertion was inaccessible at the time of validation.
ASSERTION_JSON_INVALID
The JSON(-LD) of an assertion is not valid.
ASSERTION_MISSING
An assertion listed in the ingredient’s claim is missing from the ingredient’s manifest.
ASSERTION_NOT_REDACTED
An assertion was declared as redacted in the ingredient’s claim but is still present in the ingredient’s manifest.
ASSERTION_REQUIRED_MISSING
A required field is not present in an assertion.
ASSERTION_SELF_REDACTED
An assertion was declared as redacted by its own claim.
ASSERTION_UNDECLARED
An assertion was found in the ingredient’s manifest that was not explicitly declared in the ingredient’s claim.
CLAIM_CBOR_INVALID
The cbor of the claim is not valid.
CLAIM_MISSING
The referenced claim in the ingredient’s manifest cannot be found.
CLAIM_MULTIPLE
More than one claim box is present in the manifest.
CLAIM_REQUIRED_MISSING
A required field is not present in the claim.
CLAIM_SIGNATURE_MISMATCH
The claim signature referenced in the ingredient’s claim failed to validate.
CLAIM_SIGNATURE_MISSING
The claim signature referenced in the ingredient’s claim cannot be found in its manifest.
CLAIM_SIGNATURE_VALIDATED
The claim signature referenced in the ingredient’s claim validated.
GENERAL_ERROR
A value to be used when there was an error not specifically listed here.
HARD_BINDINGS_MISSING
No hard bindings are present in the claim.
HARD_BINDINGS_MULTIPLE
Any corresponding URL should point to a C2PA assertion.
INGREDIENT_HASHEDURI_MISMATCH
The hash of the the referenced ingredient claim in the manifest does not match the corresponding hash in the ingredient’s hashed URI in the claim.
MANIFEST_INACCESSIBLE
If a manifest was documented to exist in a remote location, but is not present there, or the location is not currently available (such as in an offline scenario), the manifest.inaccessible error code shall be used to report the situation.
MANIFEST_MULTIPLE_PARENTS
The manifest has more than one ingredient whose relationship is parentOf.
MANIFEST_UPDATE_INVALID
The manifest is an update manifest, but it contains hard binding or actions assertions.
MANIFEST_UPDATE_WRONG_PARENTS
The manifest is an update manifest, but it contains either zero or multiple parentOf ingredients.
SIGNING_CREDENTIAL_EXPIRED
The signing credential has expired.
SIGNING_CREDENTIAL_INVALID
The signing credential is not valid for signing.
SIGNING_CREDENTIAL_REVOKED
The signing credential has been revoked by the issuer.
SIGNING_CREDENTIAL_TRUSTED
The signing credential is listed on the validator’s trust list.
SIGNING_CREDENTIAL_UNTRUSTED
The signing credential is not listed on the validator’s trust list.
TIMESTAMP_MISMATCH
The time-stamp does not correspond to the contents of the claim.
TIMESTAMP_OUTSIDE_VALIDITY
The signed time-stamp attribute in the signature falls outside the validity window of the signing certificate or the TSA’s certificate.
TIMESTAMP_TRUSTED
The time-stamp credential is listed on the validator’s trust list.
TIMESTAMP_UNTRUSTED
The time-stamp credential is not listed on the validator’s trust list.

Functions§

is_success
Returns true if the status code is a known C2PA success status code.
log_kind
Returns the LogKind for a given status code.