protected PdfPKCS7 CoversWholeDocument()
{
PdfPKCS7 pkcs7 = fields.VerifySignature(signatureName);
if (fields.SignatureCoversWholeDocument(signatureName))
LOGGER.Info("The timestamp covers whole document.");
else throw new VerificationException(null, "Signature doesn't cover whole document.");
if (pkcs7.Verify()) {
LOGGER.Info("The signed document has not been modified.");
return pkcs7;
}
throw new VerificationException(null, "The document was altered after the signature was applied.");
}