aboutsummaryrefslogtreecommitdiff
path: root/signature-standards/sigs-pades/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'signature-standards/sigs-pades/src/main/java')
-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
2 files changed, 8 insertions, 6 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);