Verifying a document

A completed agreement carries its own proof. Anyone holding the sealed PDF can check it, with no account and without asking the server that made it.

What is checked

  • The seal: the byte ranges it covers, the digest, the CMS signature, and the certificate chain up to a root you trust.
  • The timestamp: when the seal was made, from an RFC 3161 timestamp authority rather than the server's clock.
  • Every later revision: anything appended after the seal must be of a kind the seal allows (for example long-term validation data). Anything else, including the hiding and replacing tricks known as shadow attacks, makes the document fail.
  • The audit trail embedded as audit-trail.json: every event's hash, its link to the one before, and the sequence.

In the browser

Use the Verify page on this site, which has a sealed and a tampered sample to try, or open /verify.html on any OpenSeal install, or serve the web app yourself. Drop the PDF on the page. The check is the engine's own verifier compiled to WebAssembly: it runs in your browser and the file is never uploaded.

The verify page reporting Signed and unchanged: the file, one valid signature, three revisions, the trusted certificate used and when it was checked, then the signature's time, coverage and format.The verify page reporting Signed and unchanged: the file, one valid signature, three revisions, the trusted certificate used and when it was checked, then the signature's time, coverage and format.
A sealed test document, signed and unchanged.

Add the certificate of the authority you trust under Trusted certificates (DER or PEM): your organisation's root, or the root of the service that sealed the document. Without one, the verifier can confirm the document is unchanged but not who issued the seal, and says so.

Offline

The verify page needs nothing from a server once it has loaded: save it, or serve webapp/ from a laptop with python3 -I tools/serve-webapp.py, disconnect, and verify. The verifier module is built by tools/build-webapp-wasm.sh.

On the command line

The openseal command runs the same engine natively.

cargo build --release -p casual-sign-cli
target/release/openseal verify agreement.pdf --trust root.pem
target/release/openseal verify agreement.pdf --trust root.pem --json
target/release/openseal audit verify audit-trail.json --head <chain head>

Exit codes: 0 every signature passed and the last covers the whole file; 1 verification failed; 4 indeterminate (nothing failed, but not every signature could be confirmed, for example without a trusted root). openseal help lists them all.

With independent validators

OpenSeal seals are standard PAdES, so tools that know nothing about OpenSeal can check them. The project's own tests require three to agree on every sealed and every tampered fixture: our verifier, pyHanko and the European Commission's DSS.

pip install pyhanko
pyhanko sign validate --trust root.pem --pretty-print agreement.pdf

Validation in Adobe Acrobat is a release gate (PV-01) that has not been passed yet, so OpenSeal makes no claim about how Acrobat shows its seals. Seals from the development stack validate only against that stack's generated root.

Reading the result

OutcomeMeans
Signed and unchangedEvery signature checks out, and nothing changed after signing except what the signatures allow.
IndeterminateNothing failed, but something could not be confirmed: usually the issuer is not among your trusted certificates.
FailedA signature does not verify, or the document was changed in a way its signatures do not allow. Treat it as altered.