You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Thomas Chojecki (JIRA)" <ji...@apache.org> on 2013/10/30 23:34:26 UTC

[jira] [Updated] (PDFBOX-1751) Signing external signed document again with pdfbox, break the document.

     [ https://issues.apache.org/jira/browse/PDFBOX-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Chojecki updated PDFBOX-1751:
------------------------------------

    Affects Version/s: 1.8.1
                       1.8.2
              Summary: Signing external signed document again with pdfbox, break the document.  (was: SignDict/Contents illegal data)

> Signing external signed document again with pdfbox, break the document.
> -----------------------------------------------------------------------
>
>                 Key: PDFBOX-1751
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1751
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Signing
>    Affects Versions: 1.8.0, 1.8.1, 1.8.2
>         Environment: Windows 8.1
>            Reporter: David KELLER
>            Assignee: Thomas Chojecki
>              Labels: security, signature
>         Attachments: contract.pdf, contract.pdf_signedIText.pdf, contract.pdf_signedPdfBox.pdf, contract_signed_Cryptolog.pdf, PADESSigner.java
>
>
> 1/ I sign a file using this method
> 	public static void signByPdfbox(
> 			File inputPDF,
> 			File outputPDF,
> 			KeyStore ks,
> 			String password) 
> 	throws IOException, UnrecoverableKeyException, KeyStoreException, NoSuchAlgorithmException, COSVisitorException, SignatureException {
> 		PDDocument inputDoc = PDDocument.load(inputPDF);
> 		
> 		
> 		PADESSigner signer = new PADESSigner(ks, password);
> 		
> 		signer.setSignatureName("Hello1");
> 		signer.setSignatureReason("Why noy");
> 		signer.setSignatureLocation("Curacao");
> 		signer.setSignatureContactInfo("david.keller.fr@gmail.com");
> 		
> 		signer.signPDF(inputDoc, outputPDF);
> 	}
> 2/ I resign the same file using the same method and in acrobat reader I have this error : SignDict/Contents illegal data
> I have googelized it, and I found only old topics for iText lib.
> I have tried the same with iText 5.X, and double signatures works



--
This message was sent by Atlassian JIRA
(v6.1#6144)