Every compliant PDF-PQS verifier reports the same standardized error and warning codes. That way, whether your team uses the Rust CLI, a backend service, or a custom library, your application logic and UI messages can handle every outcome consistently.
The table below is generated automatically at build time from Appendix B of the specification.
How result codes work
E_codes are failures. Any failure code (on a signature or on the file) makes the overall verification resultinvalid.W_codes are warnings. Warnings never turn a valid document intoinvalid, but your verifier or UI must still show them (for example, letting a user know pages were edited after signing).- One failure per signature. When checking a signature, the verifier stops at the first failure, emits that single
E_code, and skips warnings for that signature. - Signature scope vs. file scope.
E_PARSEin step 1,E_POLICY_UNAVAILABLE, andE_PQC_REQUIRED_MISSINGapply to the entire file (fileCodes). Every other code applies to a specific signature. - Forward compatibility. Verifiers must never repurpose an existing code for a different error condition. If your app sees a new code added by a future version of the standard, treat any
E_prefix as a failure and anyW_prefix as a warning.
Codes
| 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 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). |
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. |
Overall file results
| Result | When it is returned |
|---|---|
valid |
Steps 1 to 11 pass for every PDF-PQS signature, no file-level failures occur, and every certificate chain ends at a configured trust anchor. |
valid-domain-only |
Steps 1 to 11 pass for every signature, and at least one chain ends at an issuer published in a domain’s policy document (W_DOMAIN_ONLY). Do not display identity assurance claims from certificate policies for this result. |
invalid |
Any failure code (E_*) is reported for a signature or for the file. |
no-signature |
The file has no PDF-PQS signatures and step 11 passes with no failure codes. |
See Verification flow for a visual map showing which step produces each code.