diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2013-12-12 12:46:58 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2013-12-12 12:46:58 +0100 |
commit | bb88a94c829fbdb172b3edcecaa9fa441035d47d (patch) | |
tree | 0ef4749ec58f5f767ee370b72bf681d9b311bb7e /pdf-as-lib/src/main/java | |
parent | 40fc290721a9ab0c7a815dc60ea965d615860f21 (diff) | |
download | pdf-as-4-bb88a94c829fbdb172b3edcecaa9fa441035d47d.tar.gz pdf-as-4-bb88a94c829fbdb172b3edcecaa9fa441035d47d.tar.bz2 pdf-as-4-bb88a94c829fbdb172b3edcecaa9fa441035d47d.zip |
Small changes
Diffstat (limited to 'pdf-as-lib/src/main/java')
-rw-r--r-- | pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java | 3 | ||||
-rw-r--r-- | pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PdfboxSignerWrapper.java | 10 |
2 files changed, 1 insertions, 12 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java index 93fbbfea..8011e1eb 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java @@ -17,8 +17,6 @@ import org.apache.log4j.PropertyConfigurator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.sun.org.apache.bcel.internal.generic.NEW; - import at.gv.egiz.pdfas.lib.api.sign.SignParameter; import at.gv.egiz.pdfas.lib.api.verify.VerifyParameter; import at.gv.egiz.pdfas.lib.impl.PdfAsImpl; @@ -39,7 +37,6 @@ public class PdfAsFactory { // iaik.security.ecc.provider.ECCProvider.addAsProvider(); IAIK.addAsProvider(); - ; // ECCProvider.addAsProvider(); // install security provider ECCelerate.addAsProvider(); 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 718acc24..8000d8a0 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 @@ -1,6 +1,5 @@ package at.gv.egiz.pdfas.lib.impl.signing.pdfbox; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Calendar; @@ -10,13 +9,10 @@ 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; import at.gv.egiz.pdfas.common.utils.StreamUtils; -import at.gv.egiz.pdfas.common.utils.StringUtils; import at.gv.egiz.pdfas.lib.api.sign.IPlainSigner; import at.gv.egiz.pdfas.lib.impl.signing.sig_interface.PDFASSignatureInterface; @@ -40,12 +36,8 @@ public class PdfboxSignerWrapper implements PDFASSignatureInterface { byte[] data = StreamUtils.inputStreamToByteArray(inputStream); byteRange = PDFUtils.extractSignatureByteRange(data); try { + logger.info("Signing with Pdfbox Wrapper"); byte[] signature = signer.sign(data, byteRange); - /*logger.debug("Signature Data: " - + iaik.utils.Util.toBase64String(signature));*/ - FileOutputStream fos = new FileOutputStream("/tmp/fos.bin"); - fos.write(signature); - fos.close(); return signature; } catch (PdfAsException e) { throw new PdfAsWrappedIOException(e); |