diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2013-11-27 17:52:48 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2013-11-27 17:52:48 +0100 |
commit | b7a47b0feebd402d9a14d3f6d43ac6576c753367 (patch) | |
tree | a3e5204a0eb577fac131e57aa4a4f240afb3aae4 /pdf-as-lib/src/main/java/at/gv | |
parent | 48216bdf6d0e6b8e34d53fe196c4a6a7ec868b93 (diff) | |
download | pdf-as-4-b7a47b0feebd402d9a14d3f6d43ac6576c753367.tar.gz pdf-as-4-b7a47b0feebd402d9a14d3f6d43ac6576c753367.tar.bz2 pdf-as-4-b7a47b0feebd402d9a14d3f6d43ac6576c753367.zip |
Works in progress
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv')
3 files changed, 6 insertions, 4 deletions
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<String, HashMap<String, IVerifyFilter>> filterMap = new HashMap<String, HashMap<String, IVerifyFilter>>(); |