PortableSigner2 icon indicating copy to clipboard operation
PortableSigner2 copied to clipboard

Port library to itext 5.5?

Open petterreinholdtsen opened this issue 8 years ago • 2 comments

Hi. I'm trying to build portablesigner in Debian, and there the itext library is version 5.5. But in this version, the PdfSignatureApperance.setCrypto() method no longer exist and the code fail to build.

According to http://stackoverflow.com/questions/11437709/signing-a-pdf-with-itextsharp and http://stackoverflow.com/questions/28753918/digital-signatures-using-itext-5-5-5 the API was changed in version 5.3.

Would you be willing to port portablesigner to the new API?

petterreinholdtsen avatar Mar 31 '16 12:03 petterreinholdtsen

I was able to compile the source by modifying line 360 in src/net/pflaeging/PortableSigner/PDFSigner.java, replacing

sap.setCrypto(GetPKCS12.privateKey, GetPKCS12.certificateChain, null, null);

with sap.setCertificate(GetPKCS12.certificateChain[0]);

I doubt that change is correct, but have not been able to test the program yet.

petterreinholdtsen avatar Mar 31 '16 12:03 petterreinholdtsen

I notice the commit message for https://github.com/jaapgeurts/PortableSigner2/commit/e6eb6468ac6d07f239868ef63cd4634aaac93e05 claim to update to newer itext version. Perhaps it is related?

petterreinholdtsen avatar May 09 '19 08:05 petterreinholdtsen