Skip to content

modern-pdf-lib


modern-pdf-lib / verifySignatures

Function: verifySignatures()

verifySignatures(pdfBytes): Promise<SignatureVerificationResult[]>

Defined in: src/signature/signatureVerifier.ts:338

Verify all signatures in a PDF.

For each signature found:

  1. Computes the hash of the ByteRange-covered bytes
  2. Extracts the PKCS#7 structure
  3. Verifies the message digest matches
  4. Verifies the cryptographic signature against the certificate

Parameters

pdfBytes

Uint8Array

The PDF file bytes.

Returns

Promise<SignatureVerificationResult[]>

Array of verification results.

Released under the MIT License.