validate

fun validate(trustAnchors: List<ByteArray> = emptyList(), revocationData: List<ByteArray> = emptyList()): PdfSignatureValidation(source)

Checks the signature against the file. trustAnchors are the DER encodings of the certificates the caller trusts. An entry that is not a certificate is ignored. The check hashes the signed bytes, which are almost the whole file, so run it off the main thread.

PdfCertificate.revocation reports revocation from the CRLs and OCSP responses that the document carries, in its document security store and in the signature, and from revocationData, each a DER CRL or OCSP response that the caller fetched. KitePDF fetches nothing from the network. It does not check that the certificates were valid at the time of signing: PdfCertificate.notBefore and PdfCertificate.notAfter give the dates.