printinghaa.blogg.se

How to validate signature in pdf
How to validate signature in pdf







how to validate signature in pdf

To prevent confusing our users, our default UI does not show the integrity status of a document if the certificate validation failed (that is, if the general signature status is “error”).īelow is the validation UI that is shown when the certificate is not self-signed or hasn’t expired but is not yet trusted by PSPDFKit. In this case, we are informed that the certificate is not valid because it has expired. This is not necessarily bad, but we find out about this situation with a severity level of “warning.”īelow we can see what happens if we try to validate a signature with an expired certificate. Finally, the UI lets us know that the certificate used for signing was a self-signed certificate. In this case, the document has not been modified since it was signed, which is a good sign. Following that paragraph, the integrity status of the document is displayed.

how to validate signature in pdf

This information always comes from the certificate itself, so you don’t have programmatic access to modify it. Next, the signer name and signing date is shown. In this sample case, the first paragraph informs us of the general status of the digital signature. Let’s take a look at our validation UI when the document is signed with a self-signed certificate: If coversEntireDocument returns false, it means the digital signature only covers a particular revision of the document - that is, there may be subsequent revisions covered by digital signatures that were applied later on. Additionally, the coversEntireDocument Boolean property is useful if the document has many digital signatures. Programmatically, the PDFSignatureStatus class contains a property, signatureIntegrityStatus, that can be queried to determine if the document was altered in some way after it was digitally signed. If you validate a digital signature with PSPDFKit, either programmatically or using our UI, there can be several possible statuses for the signature. This can be very useful for the topic that comes next.

how to validate signature in pdf

PSPDFSignatureValidator *validator = initWithSignatureFormElement:signatureFormElement]

how to validate signature in pdf

Let status = try validator.verifySignature(withTrustedCertificates: certificates) let validator = PDFSignatureValidator(signatureFormElement: signatureFormElement)









How to validate signature in pdf