Skip to content

Validation

Validation answers three separate questions, and UniPDF keeps them apart.

Integrity asks whether the signed bytes are unchanged and the signature matches them under the certificate in the file. ValidateSignatures answers that and reports it as IsVerified. It does not say who signed: anyone can make a certificate with any name on it, and a signature made with it verifies.

Trust asks whether that certificate chains to an authority you accept, was valid at the right time, and was not revoked. ValidateSignaturesWithOpts answers that from trust roots you supply, and reports it as IsTrusted.

Coverage asks how much of the file the signature protects. Content can be appended after signing without breaking the signature, so a signature can be intact and trusted while the reader shows a later revision the signer never saw. Both calls report it in IsCoveringEntireFile, IsCoveringEntireRevision, RevisionsAfterSignature and ContentsGapOnly.

GuideCovers
Validating Digital SignatureThe integrity check, and the result fields it fills.
Validating Signer Trust and RevocationTrust roots, intermediates, validation time, CRL and OCSP checks.
Checking What a Signature CoversByteRange coverage and revisions appended after signing.
Validating PAdES SignaturesThe handler set PAdES signatures need.
Validate a Timestamp SignatureDocument timestamps and the time they assert.

The examples are in signatures/validation.

Last updated on