aboutsummaryrefslogtreecommitdiff
path: root/signature-standards
diff options
context:
space:
mode:
Diffstat (limited to 'signature-standards')
-rw-r--r--signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSigner.java9
-rw-r--r--signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java5
-rw-r--r--signature-standards/sigs-pkcs7detached/src/main/java/at/gv/egiz/pdfas/sigs/pkcs7detached/PKCS7DetachedSigner.java5
3 files changed, 11 insertions, 8 deletions
diff --git a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSigner.java b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSigner.java
index 7c6269e0..67b17783 100644
--- a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSigner.java
+++ b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSigner.java
@@ -29,6 +29,7 @@ import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature;
import at.gv.egiz.pdfas.common.exceptions.PdfAsException;
import at.gv.egiz.pdfas.lib.api.sign.IPlainSigner;
+import at.gv.egiz.pdfas.lib.api.sign.SignParameter;
import at.gv.egiz.sl.util.ISignatureConnector;
import at.gv.egiz.sl.util.ISignatureConnectorSLWrapper;
import at.gv.egiz.sl.util.ISLConnector;
@@ -45,12 +46,12 @@ public class PAdESSigner implements IPlainSigner {
this.plainSigner = signer;
}
- public X509Certificate getCertificate() throws PdfAsException {
- return this.plainSigner.getCertificate();
+ public X509Certificate getCertificate(SignParameter parameter) throws PdfAsException {
+ return this.plainSigner.getCertificate(parameter);
}
- public byte[] sign(byte[] input, int[] byteRange) throws PdfAsException {
- return this.plainSigner.sign(input, byteRange);
+ public byte[] sign(byte[] input, int[] byteRange, SignParameter parameter) throws PdfAsException {
+ return this.plainSigner.sign(input, byteRange, parameter);
}
public String getPDFSubFilter() {
diff --git a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java
index f0eedb61..7f62b294 100644
--- a/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java
+++ b/signature-standards/sigs-pades/src/main/java/at/gv/egiz/pdfas/sigs/pades/PAdESSignerKeystore.java
@@ -58,6 +58,7 @@ import org.slf4j.LoggerFactory;
import at.gv.egiz.pdfas.common.exceptions.PdfAsException;
import at.gv.egiz.pdfas.common.exceptions.PdfAsSignatureException;
import at.gv.egiz.pdfas.lib.api.sign.IPlainSigner;
+import at.gv.egiz.pdfas.lib.api.sign.SignParameter;
import at.gv.egiz.pdfas.lib.util.CertificateUtils;
public class PAdESSignerKeystore implements IPlainSigner {
@@ -81,7 +82,7 @@ public class PAdESSignerKeystore implements IPlainSigner {
}
}
- public X509Certificate getCertificate() {
+ public X509Certificate getCertificate(SignParameter parameter) {
return cert;
}
@@ -133,7 +134,7 @@ public class PAdESSignerKeystore implements IPlainSigner {
signerInfo.setSignedAttributes(attributeArray);
}
- public byte[] sign(byte[] input, int[] byteRange) throws PdfAsException {
+ public byte[] sign(byte[] input, int[] byteRange, SignParameter parameter) throws PdfAsException {
try {
logger.info("Creating PAdES signature.");
IssuerAndSerialNumber issuer = new IssuerAndSerialNumber(cert);
diff --git a/signature-standards/sigs-pkcs7detached/src/main/java/at/gv/egiz/pdfas/sigs/pkcs7detached/PKCS7DetachedSigner.java b/signature-standards/sigs-pkcs7detached/src/main/java/at/gv/egiz/pdfas/sigs/pkcs7detached/PKCS7DetachedSigner.java
index 62839ea6..802b7590 100644
--- a/signature-standards/sigs-pkcs7detached/src/main/java/at/gv/egiz/pdfas/sigs/pkcs7detached/PKCS7DetachedSigner.java
+++ b/signature-standards/sigs-pkcs7detached/src/main/java/at/gv/egiz/pdfas/sigs/pkcs7detached/PKCS7DetachedSigner.java
@@ -50,6 +50,7 @@ import org.slf4j.LoggerFactory;
import at.gv.egiz.pdfas.common.exceptions.PdfAsException;
import at.gv.egiz.pdfas.common.exceptions.PdfAsSignatureException;
import at.gv.egiz.pdfas.lib.api.sign.IPlainSigner;
+import at.gv.egiz.pdfas.lib.api.sign.SignParameter;
/**
* Creates a PKCS7 detached PDF signature
@@ -75,11 +76,11 @@ public class PKCS7DetachedSigner implements IPlainSigner {
}
}
- public X509Certificate getCertificate() {
+ public X509Certificate getCertificate(SignParameter parameter) {
return cert;
}
- public byte[] sign(byte[] input, int[] byteRange) throws PdfAsException {
+ public byte[] sign(byte[] input, int[] byteRange, SignParameter parameter) throws PdfAsException {
try {
logger.info("Creating PKCS7 signature.");
IssuerAndSerialNumber issuer = new IssuerAndSerialNumber(cert);