aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib/src/main/java/at')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java3
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PdfboxSignerWrapper.java10
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);