![]() ReadySignatureSigner extSigContainer = new ReadySignatureSigner(signature) Step #3 > Apply the signature to the document Signature = CreatePKCS7SignatureViaX509Certificate(hash) Signature = CreatePKCS7SignatureViaPKCS11(hash, pin) This is the part which accesses the HSM via PCKS11 ![]() Step #2 > Create the signature based on the document hash Signer.SignExternalContainer(external, EstimateSize) Signer.SetFieldName(SignatureAttributeName) ĭigestCalcBlankSigner external = new DigestCalcBlankSigner(PdfName.Adobe_PPKLite, PdfName.Adbe_pkcs7_detached) SignatureAttributeName = $"SignatureAttributeName_" Throw new Exception("Unable to set provided signature image", ex) PdfSignatureAppearance appearance = signer.GetSignatureAppearance() īase.SetPdfSignatureAppearance(appearance, visualRepresentation) ![]() Signer.SetCertificationLevel(PdfSigner.NOT_CERTIFIED) Has to be NOT_CERTIFIED since otherwiese a pdf cannot be signed multiple times ![]() Var signer = new PdfSigner(reader, baos, sp) Using (MemoryStream baos = new MemoryStream()) StampingProperties sp = new StampingProperties() Using (var reader = new PdfReader(input)) Using (MemoryStream input = new MemoryStream(pdfToSign)) Unsigned Pdf document on which the first signature becomes invalid:Ĭode used for signing //Step #1 > prepare pdf for signing (Allocate space for the signature and calculate hash) Question: What can i do in order to keep both signatures valid in the Acrobat Reader? I've found a similar issue on stackoverflow ( multiple signatures invalidate first signature in iTextSharp pdf signing), but it was using iText 5 and i'm not sure it is the same problem. The signatures of the same document are shown as valid in foxit reader. If the pdf was created by combining multiple pdf documents with adobe DC, the first signature is valid but becomes invalid as soon as the seconds signature is applied.ĭocument in Adobe reader after the first signature is applied:ĭocument in Adobe reader after the second signature is applied: created via word, i can apply multiple signatures and all signatures are shown as valid in the adobe acrobat reader. SignDeferred is required since the signature is created PKCS11 hardware token (usb key). Let us know how it goes and share your findings.I'm using iText 7.1.15 and SignDeferred to apply signatures to pdf documents. You can also refer to the Adobe article Validating digital signatures, Adobe Acrobat This identifies the owner of the digital certificate that has been used when signing the document.ĥ) Mark the certification path, click the 'Trust' tab and then 'Add to Trusted Identities'.Ħ) Answer 'OK' to any security question that follows.ħ) Check the field for 'Use this certificate as a trusted root' and click 'OK' twice to close this and the next window.Ĩ) Click 'Validate Signature' to execute the validation. You may try the following steps and see if this helps:ġ) Right-click on the ‘validity unknown’ icon and click on ‘Validate Signature’.Ģ) You will get the signature validation status window, click on ‘Signature Properties’.Ĥ) Verify that there is a certification path. Is it specific to one PDF file or with all the PDF files? Is it a Mac or Windows machine and what is the version of operating system installed? What is the dot version of Adobe Reader installed? To identify refer to Identify the product and its version for Acrobat and Reader DC Is it possible to post a screenshot of the error message you get? To share the screenshot, refer to the steps mentioned in the article Additional status details appear in the Signatures panel and in the Signature Properties dialog box. When Digital Signatures are validated, an icon appears in the document message bar to indicate the signature status. As per the description above, I can understand that you are not able to validate a signature in a PDF file, Is that correct?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |