diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-16 09:43:49 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-16 09:43:49 +0200 |
commit | 3c4eac027bfd68bfce63a2eed010ccc2b7310802 (patch) | |
tree | 507f8586045b57e4457da23ce7aedca6a497a913 /pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets | |
parent | 00894355450179bea4b56e0abcf16243964ff286 (diff) | |
download | pdf-as-4-3c4eac027bfd68bfce63a2eed010ccc2b7310802.tar.gz pdf-as-4-3c4eac027bfd68bfce63a2eed010ccc2b7310802.tar.bz2 pdf-as-4-3c4eac027bfd68bfce63a2eed010ccc2b7310802.zip |
PreProcessor Interface added and API rebuild
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets')
3 files changed, 11 insertions, 4 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java index ce19f803..7900dfde 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java @@ -302,7 +302,7 @@ public class ExternSignServlet extends HttpServlet { PdfAsHelper.startSignature(request, response, getServletContext(), pdfData, connector, PdfAsHelper.buildPosString(request, response), transactionId, PdfAsParameterExtractor - .getSigType(request)); + .getSigType(request), PdfAsParameterExtractor.getPreProcessorMap(request)); return; } else if (connector.equals("jks") || connector.equals("moa")) { // start synchronous siganture creation diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/UIEntryPointServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/UIEntryPointServlet.java index 544f6c83..e602a8e0 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/UIEntryPointServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/UIEntryPointServlet.java @@ -24,6 +24,7 @@ package at.gv.egiz.pdfas.web.servlets; import java.io.IOException; +import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; @@ -147,12 +148,17 @@ public class UIEntryPointServlet extends HttpServlet { "Invalid connector mobilebku is not supported"); } } - + Map<String, String> map = null; + if(pdfAsRequest.getParameters().getPreprocessor() != null) { + map = pdfAsRequest.getParameters().getPreprocessor().getMap(); + } + PdfAsHelper.startSignature(req, resp, getServletContext(), pdfAsRequest.getInputData(), connector.toString(), pdfAsRequest.getParameters().getPosition(), pdfAsRequest.getParameters().getTransactionId(), - pdfAsRequest.getParameters().getProfile()); + pdfAsRequest.getParameters().getProfile(), + map); } else { throw new PdfAsWebException("Invalid connector (" + Connector.BKU + " | " + Connector.ONLINEBKU + " | " diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java index 09af4357..aaa6afbb 100644 --- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java +++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java @@ -254,7 +254,8 @@ public class VerifyServlet extends HttpServlet { logger.debug("Format: " + format); - List<VerifyResult> results = PdfAsHelper.synchornousVerify(pdfData, -1, lvl); + List<VerifyResult> results = PdfAsHelper.synchornousVerify(pdfData, -1, lvl, + PdfAsParameterExtractor.getPreProcessorMap(request)); PdfAsHelper.setVerificationResult(request, results); |