---
title: "Appendix B. Verification Result Codes"
description: "Appendix B of draft-laget-pdf-pqs-00."
---

> Documentation Index
> Fetch the complete documentation index at: https://pdf-pqs.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Appendix B. Verification Result Codes

This appendix is normative. Verifiers MUST report the symbolic codes listed below verbatim
so that outcomes are directly comparable across independent implementations. Any failure
code produces an overall result of `invalid`; warning codes do not alter the overall
result. The Step column identifies the step of [Section 9](https://pdf-pqs.org/specification/verification) that emits each code.

Each code applies to a single PDF-PQS signature, except `E_PQC_REQUIRED_MISSING`,
`E_POLICY_UNAVAILABLE`, and `E_PARSE` emitted in step 1, which apply at the file level.

| Code | Kind | Step | Condition |
|---|---|---|---|
| `E_PARSE` | Failure | 1, 2 | The input cannot be parsed as a valid PDF file (step 1, file-level), or the signature payload is not a DER-encoded ContentInfo containing SignedData (step 2). |
| `E_ALG_NOT_ALLOWED` | Failure | 2 | The signature algorithm or signer public key is neither ML-DSA-65 nor ML-DSA-87 (for example, ML-DSA-44, HashML-DSA, or a classical algorithm). |
| `E_PROFILE` | Failure | 2 | Another payload constraint in [Section 4](https://pdf-pqs.org/specification/payload) is violated (for example, eContent is present, eContentType is not id-data, SignerInfos does not contain exactly one entry, digestAlgorithm is not SHA-512, a required signed attribute is missing, duplicated, or malformed, or the signer certificate is absent). |
| `E_LENGTH_OUT_OF_RANGE` | Failure | 3 | L exceeds the byte length of the file. |
| `E_NOT_REVISION_END` | Failure | 3 | L does not correspond to a revision end in the PDF cross-reference chain. |
| `E_DIGEST_MISMATCH` | Failure | 4 | The SHA-512 digest of `[0, L)` does not match the `message-digest` signed attribute. |
| `E_SIGNATURE_INVALID` | Failure | 5 | Cryptographic verification of the ML-DSA signature over the DER-encoded signed attributes fails. |
| `E_SIGNING_CERT_MISMATCH` | Failure | 6 | The `signing-certificate-v2` attribute does not match the signer's certificate. |
| `E_CERT_EXPIRED` | Failure | 7 | A certificate in the certification path is outside its validity period at the validation time. |
| `E_PATH_INVALID` | Failure | 7 | No valid certification path terminates at a configured trust anchor or at a domain policy issuer. Policy, name constraint, and key usage failures map to this code. |
| `E_TIMESTAMP_INVALID` | Failure | 8 | An ML-DSA signature timestamp token is present but fails cryptographic verification or certification path validation. |
| `E_REVOKED` | Failure | 9 | A certificate in the certification path is revoked as of the applicable revocation time ([Section 8](https://pdf-pqs.org/specification/revocation)). |
| `E_REVOCATION_UNKNOWN` | Failure | 9 | No valid, in-force CRL is available for a certificate in the certification path. |
| `E_HOST_BOUNDARY` | Failure | 10 | Place A only: L does not equal the starting byte offset of the revision that introduces the host signature. |
| `E_PQC_REQUIRED_MISSING` | Failure | 11 | A classical signature requires a covering PDF-PQS signature under its domain's `pqcRequiredFrom` policy, and no qualifying PDF-PQS signature of that domain covers it (file-level). |
| `E_POLICY_UNAVAILABLE` | Failure | 11 | Step 11 requires a domain's policy document, the fetch returns Unavailable, and no cached copy exists (file-level). |
| `W_DOMAIN_ONLY` | Warning | 7 | The certification path terminates at an issuer from the signer's domain policy document rather than at a configured trust anchor. |
| `W_NO_TIMESTAMP` | Warning | 8 | No ML-DSA signature timestamp token is present; classically signed timestamp tokens are treated as absent. |
| `W_CHANGES_AFTER_L` | Warning | 12 | Modifications exist after offset L beyond the signature itself: either an additional revision follows the signature revision, or the signature revision modifies an object disallowed by [Section 5](https://pdf-pqs.org/specification/covered). |

Verifiers MAY attach implementation-specific diagnostic detail (such as an underlying
cryptographic library error string) alongside a code, but MUST NOT reuse any code in this
table for a different condition. Future revisions of this specification may define
additional codes. A verifier encountering an unrecognized code MUST treat codes prefixed
with `E_` as failures and codes prefixed with `W_` as warnings.

Source: https://pdf-pqs.org/specification/codes/index.mdx
