aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at
diff options
context:
space:
mode:
authorAndreas Fitzek <afitzek@iaik.tugraz.at>2014-06-05 15:14:21 +0200
committerAndreas Fitzek <afitzek@iaik.tugraz.at>2014-06-05 15:14:21 +0200
commitda4c666bc905eb5e9378307c801da18795f233c9 (patch)
treedef29ada8abfa546dfd0eaf0aadf0c4359598727 /pdf-as-web/src/main/java/at
parent5e77141f169db3830d1b76139389d1fc210d1969 (diff)
parent370af0e71a27a9e0a3970d1eabe83dabc4d1a1a9 (diff)
downloadpdf-as-4-da4c666bc905eb5e9378307c801da18795f233c9.tar.gz
pdf-as-4-da4c666bc905eb5e9378307c801da18795f233c9.tar.bz2
pdf-as-4-da4c666bc905eb5e9378307c801da18795f233c9.zip
Merge branch 'afitzek.RC2' of gitlab.iaik.tugraz.at:afitzek/pdf-as-4 into afitzek.RC2
Diffstat (limited to 'pdf-as-web/src/main/java/at')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java6
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java3
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/UIEntryPointServlet.java3
3 files changed, 7 insertions, 5 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java
index 421edff4..f64ffac0 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java
@@ -139,7 +139,7 @@ public class PdfAsHelper {
}
}
- private static String buildPosString(HttpServletRequest request,
+ public static String buildPosString(HttpServletRequest request,
HttpServletResponse response) throws PdfAsWebException {
String posP = PdfAsParameterExtractor.getSigPosP(request);
String posX = PdfAsParameterExtractor.getSigPosX(request);
@@ -388,7 +388,7 @@ public class PdfAsHelper {
public static void startSignature(HttpServletRequest request,
HttpServletResponse response, ServletContext context, byte[] pdfData,
- String connector, String transactionId)
+ String connector, String position, String transactionId)
throws Exception {
// TODO: Protect session so that only one PDF can be signed during one
@@ -441,7 +441,7 @@ public class PdfAsHelper {
signParameter.setOutput(dataSink);
// set Signature Position
- signParameter.setSignaturePosition(buildPosString(request, response));
+ signParameter.setSignaturePosition(position);
StatusRequest statusRequest = pdfAs.startSign(signParameter);
session.setAttribute(PDF_STATUS, statusRequest);
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 a7d82c3e..70535573 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
@@ -280,7 +280,8 @@ public class ExternSignServlet extends HttpServlet {
}
}
- PdfAsHelper.startSignature(request, response, getServletContext(), pdfData, connector, transactionId);
+ PdfAsHelper.startSignature(request, response, getServletContext(), pdfData, connector,
+ PdfAsHelper.buildPosString(request, response), transactionId);
} 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 3aad5abb..25b2b4c0 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
@@ -103,7 +103,8 @@ public class UIEntryPointServlet extends HttpServlet {
}
PdfAsHelper.startSignature(req, resp, getServletContext(), pdfAsRequest.getInputData(),
- connector.toString(), pdfAsRequest.getParameters().getTransactionId());
+ connector.toString(), pdfAsRequest.getParameters().getPosition(),
+ pdfAsRequest.getParameters().getTransactionId());
} else {
throw new PdfAsWebException("Invalid connector (" + Connector.BKU + " | " + Connector.ONLINEBKU + " | " + Connector.MOBILEBKU + ")");
}