aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib/src')
-rw-r--r--pdf-as-lib/src/configuration/cfg/profiles/SIGNATURBLOCK_SMALL_EN.properties2
-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
3 files changed, 3 insertions, 12 deletions
diff --git a/pdf-as-lib/src/configuration/cfg/profiles/SIGNATURBLOCK_SMALL_EN.properties b/pdf-as-lib/src/configuration/cfg/profiles/SIGNATURBLOCK_SMALL_EN.properties
index 903ef549..ce21a3ab 100644
--- a/pdf-as-lib/src/configuration/cfg/profiles/SIGNATURBLOCK_SMALL_EN.properties
+++ b/pdf-as-lib/src/configuration/cfg/profiles/SIGNATURBLOCK_SMALL_EN.properties
@@ -13,6 +13,8 @@ sig_obj.SIGNATURBLOCK_SMALL_EN.key.SIG_META=Verification
sig_obj.SIGNATURBLOCK_SMALL_EN.key.SIG_NOTE=Note
sig_obj.SIGNATURBLOCK_SMALL_EN.value.SIG_SUBJECT=${subject.T != null ? (subject.T + " ") : ""}${subject.CN}
+sig_obj.SIGNATURBLOCK_SMALL_EN.value.SIG_ISSUER=${issuer.T != null ? (issuer.T + " ") : ""}${issuer.CN}
+sig_obj.SIGNATURBLOCK_SMALL_EN.value.SIG_NUMBER=${sn}
sig_obj.SIGNATURBLOCK_SMALL_EN.pos=f:80;w:260
sig_obj.SIGNATURBLOCK_SMALL_EN.adobeSignFieldValue=PDF-AS Signature
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);