From b7a47b0feebd402d9a14d3f6d43ac6576c753367 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Wed, 27 Nov 2013 17:52:48 +0100 Subject: Works in progress --- .../at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java | 2 +- .../at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PdfboxSignerWrapper.java | 4 +++- .../java/at/gv/egiz/pdfas/lib/impl/verify/VerifierDispatcher.java | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'pdf-as-lib/src/main/java/at/gv') diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java index 2e5dc62b..7273b8a9 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PADESPDFBOXSigner.java @@ -73,7 +73,7 @@ public class PADESPDFBOXSigner implements IPdfSigner { logger.debug("Signing @ " + signer.getSigningDate().getTime().toString()); // the signing date, needed for valid signature - signature.setSignDate(signer.getSigningDate()); + //signature.setSignDate(signer.getSigningDate()); signer.setPDSignature(signature); diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PdfboxSignerWrapper.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PdfboxSignerWrapper.java index 6ded2d8a..0420cd11 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PdfboxSignerWrapper.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PdfboxSignerWrapper.java @@ -10,6 +10,8 @@ import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util; + import at.gv.egiz.pdfas.common.exceptions.PdfAsException; import at.gv.egiz.pdfas.common.exceptions.PdfAsWrappedIOException; import at.gv.egiz.pdfas.common.utils.PDFUtils; @@ -40,7 +42,7 @@ public class PdfboxSignerWrapper implements PDFASSignatureInterface { try { byte[] signature = signer.sign(data, byteRange); logger.debug("Signature Data: " - + StringUtils.bytesToHexString(signature)); + + iaik.utils.Util.toBase64String(signature)); FileOutputStream fos = new FileOutputStream("/tmp/fos.bin"); fos.write(signature); fos.close(); diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/VerifierDispatcher.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/VerifierDispatcher.java index ee9c27ae..a7d4e80f 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/VerifierDispatcher.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/verify/VerifierDispatcher.java @@ -18,8 +18,8 @@ public class VerifierDispatcher { .getLogger(VerifierDispatcher.class); public static final String[] currentClasses = new String[] { - //"at.gv.egiz.pdfas.sigs.pkcs7detached.PKCS7DetachedVerifier", - "at.gv.egiz.pdfas.sigs.pades.PAdESVerifier" }; + "at.gv.egiz.pdfas.sigs.pkcs7detached.PKCS7DetachedVerifier"/*, + "at.gv.egiz.pdfas.sigs.pades.PAdESVerifier"*/ }; public Map> filterMap = new HashMap>(); -- cgit v1.2.3