aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/gv/egiz/pdfas
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java6
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsParameter.java2
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java4
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/signing/pdfbox/PdfboxSignerWrapper.java4
4 files changed, 8 insertions, 8 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 e26e3fdb..b303a139 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
@@ -1,5 +1,8 @@
package at.gv.egiz.pdfas.lib.api;
+import iaik.security.ecc.provider.ECCProvider;
+import iaik.security.provider.IAIK;
+
import java.io.File;
import org.apache.log4j.BasicConfigurator;
@@ -16,6 +19,9 @@ public class PdfAsFactory {
static {
PropertyConfigurator.configure(ClassLoader.getSystemResourceAsStream("resources/log4j.properties"));
//BasicConfigurator.configure();
+
+ IAIK.getInstance();
+ ECCProvider.addAsProvider();
}
public static PdfAs createPdfAs(File configuration) {
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsParameter.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsParameter.java
index 8ffcf998..8ab9a4be 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsParameter.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsParameter.java
@@ -9,6 +9,4 @@ public interface PdfAsParameter {
public DataSource getDataSource();
public void setDataSource(DataSource dataSource);
-
-
}
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
index 2f2d47c8..ddfc79ce 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/PdfAsImpl.java
@@ -110,10 +110,6 @@ public class PdfAsImpl implements PdfAs, IConfigurationConstants {
this.stampPdf(status);
- FileOutputStream fos = new FileOutputStream("/home/afitzek/qr_2_stamped.pdf");
- fos.write(status.getPdfObject().getStampedDocument());
- fos.close();
-
/*
* if (requestedSignature.isVisual()) {
* logger.info("Creating visual siganture block"); //
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 0420cd11..554a5b98 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
@@ -41,11 +41,11 @@ public class PdfboxSignerWrapper implements PDFASSignatureInterface {
byteRange = PDFUtils.extractSignatureByteRange(data);
try {
byte[] signature = signer.sign(data, byteRange);
- logger.debug("Signature Data: "
+ /*logger.debug("Signature Data: "
+ iaik.utils.Util.toBase64String(signature));
FileOutputStream fos = new FileOutputStream("/tmp/fos.bin");
fos.write(signature);
- fos.close();
+ fos.close();*/
return signature;
} catch (PdfAsException e) {
throw new PdfAsWrappedIOException(e);