aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java13
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASVerificationImpl.java8
2 files changed, 17 insertions, 4 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java
index 6df63a3b..d15492b4 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java
@@ -25,6 +25,7 @@ package at.gv.egiz.pdfas.web.ws;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import javax.jws.WebService;
import javax.xml.ws.WebServiceException;
@@ -39,7 +40,6 @@ import at.gv.egiz.pdfas.api.ws.PDFASSignParameters.Connector;
import at.gv.egiz.pdfas.api.ws.PDFASSignRequest;
import at.gv.egiz.pdfas.api.ws.PDFASSignResponse;
import at.gv.egiz.pdfas.api.ws.PDFASSigning;
-import at.gv.egiz.pdfas.api.ws.PDFASVerificationResponse;
import at.gv.egiz.pdfas.api.ws.VerificationLevel;
import at.gv.egiz.pdfas.lib.api.verify.VerifyParameter.SignatureVerificationLevel;
import at.gv.egiz.pdfas.lib.api.verify.VerifyResult;
@@ -79,6 +79,11 @@ public class PDFASSigningImpl implements PDFASSigning {
"Invalid connector value!");
}
+ Map<String, String> preProcessor = null;
+ if(request.getParameters().getPreprocessor() != null) {
+ preProcessor = request.getParameters().getPreprocessor().getMap();
+ }
+
if (request.getParameters().getConnector().equals(Connector.MOA)
|| request.getParameters().getConnector()
.equals(Connector.JKS)) {
@@ -94,7 +99,8 @@ public class PDFASSigningImpl implements PDFASSigning {
.synchornousVerify(
response.getSignedPDF(),
-1,
- SignatureVerificationLevel.FULL_VERIFICATION);
+ SignatureVerificationLevel.FULL_VERIFICATION,
+ preProcessor);
if (verResults.size() != 1) {
throw new WebServiceException(
@@ -106,7 +112,8 @@ public class PDFASSigningImpl implements PDFASSigning {
.synchornousVerify(
response.getSignedPDF(),
-1,
- SignatureVerificationLevel.INTEGRITY_ONLY_VERIFICATION);
+ SignatureVerificationLevel.INTEGRITY_ONLY_VERIFICATION,
+ preProcessor);
if (verResults.size() != 1) {
throw new WebServiceException(
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASVerificationImpl.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASVerificationImpl.java
index c6fb8cd7..0257f835 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASVerificationImpl.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASVerificationImpl.java
@@ -4,6 +4,7 @@ import iaik.x509.X509Certificate;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import javax.jws.WebService;
import javax.xml.ws.WebServiceException;
@@ -44,6 +45,11 @@ public class PDFASVerificationImpl implements PDFASVerification {
sigIdx = request.getSignatureIndex().intValue();
}
+ Map<String, String> preProcessor = null;
+ if(request.getPreprocessor() != null) {
+ preProcessor = request.getPreprocessor().getMap();
+ }
+
SignatureVerificationLevel lvl = SignatureVerificationLevel.INTEGRITY_ONLY_VERIFICATION;
if (request.getVerificationLevel().equals(
@@ -55,7 +61,7 @@ public class PDFASVerificationImpl implements PDFASVerification {
}
List<VerifyResult> results = PdfAsHelper.synchornousVerify(
- request.getInputData(), sigIdx, lvl);
+ request.getInputData(), sigIdx, lvl, preProcessor);
for(int i = 0; i < results.size(); i++) {
VerifyResult result = results.get(i);