aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-web/src')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsParameterExtractor.java7
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java5
2 files changed, 9 insertions, 3 deletions
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsParameterExtractor.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsParameterExtractor.java
index 9c5f8cc6..5981b99b 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsParameterExtractor.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsParameterExtractor.java
@@ -66,7 +66,7 @@ public class PdfAsParameterExtractor {
public static final String PARAM_SIG_POS_F = "sig-pos-f";
public static final String PARAM_SIG_IDX = "sig-idx";
public static final String PARAM_FILENAME = "filename";
-
+ public static final String PARAM_ORIGINAL_DIGEST = "origdigest";
public static final String PARAM_PREPROCESSOR_PREFIX = "pp:";
public static String getConnector(HttpServletRequest request) {
@@ -140,6 +140,11 @@ public class PdfAsParameterExtractor {
return finalFormat;
}
+ public static String getOrigDigest(HttpServletRequest request) {
+ String url = (String)request.getAttribute(PARAM_ORIGINAL_DIGEST);
+ return url;
+ }
+
public static String getInvokeErrorURL(HttpServletRequest request) {
String url = (String)request.getAttribute(PARAM_INVOKE_URL_ERROR);
return url;
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java
index cef19a76..b0c434af 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/PDFData.java
@@ -36,6 +36,7 @@ import org.slf4j.LoggerFactory;
import at.gv.egiz.pdfas.api.ws.PDFASVerificationResponse;
import at.gv.egiz.pdfas.web.helper.PdfAsHelper;
+import at.gv.egiz.pdfas.web.helper.PdfAsParameterExtractor;
/**
* Servlet implementation class PDFData
@@ -47,7 +48,7 @@ public class PDFData extends HttpServlet {
private static final Logger logger = LoggerFactory
.getLogger(PDFData.class);
- private static String ORIGINAL_DIGEST = "origdigest";
+
/**
* @see HttpServlet#HttpServlet()
@@ -78,7 +79,7 @@ public class PDFData extends HttpServlet {
HttpServletResponse response) throws ServletException, IOException {
byte[] signedData = PdfAsHelper.getSignedPdf(request, response);
- String plainPDFDigest = request.getParameter(ORIGINAL_DIGEST);
+ String plainPDFDigest = PdfAsParameterExtractor.getOrigDigest(request);
if (signedData != null) {
if(plainPDFDigest != null) {