aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java11
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/JSONAPIServlet.java3
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/VerifyServlet.java2
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASSigningImpl.java5
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASVerificationImpl.java2
5 files changed, 12 insertions, 11 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 34781461..2f7c9323 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
@@ -301,7 +301,7 @@ public class PdfAsHelper {
return sb.toString();
}
- public static List<VerifyResult> synchornousVerify(
+ public static List<VerifyResult> synchronousVerify(
HttpServletRequest request, HttpServletResponse response,
byte[] pdfData) throws Exception {
String signidxString = PdfAsParameterExtractor.getSigIdx(request);
@@ -332,9 +332,9 @@ public class PdfAsHelper {
return results;
}
- public static List<VerifyResult> synchornousVerify(byte[] pdfData,
- int signIdx, SignatureVerificationLevel lvl,
- Map<String, String> preProcessor) throws Exception {
+ public static List<VerifyResult> synchronousVerify(byte[] pdfData,
+ int signIdx, SignatureVerificationLevel lvl,
+ Map<String, String> preProcessor) throws Exception {
logger.debug("Verifing Signature index: " + signIdx);
Configuration config = pdfAs.getConfiguration();
@@ -528,6 +528,7 @@ public class PdfAsHelper {
*/
public static PDFASSignResponse synchronousServerSignature(byte[] pdfData,
PDFASSignParameters params, Map<String, String> dynamicSignatureBlockArguments) throws Exception {
+
Configuration config = pdfAs.getConfiguration();
if (WebConfiguration.isAllowExtOverwrite() && params.getOverrides() != null) {
@@ -1290,7 +1291,7 @@ public class PdfAsHelper {
baos.close();
PDFASVerificationResponse verResponse = new PDFASVerificationResponse();
- List<VerifyResult> verResults = PdfAsHelper.synchornousVerify(
+ List<VerifyResult> verResults = PdfAsHelper.synchronousVerify(
baos.toByteArray(), -2,
PdfAsHelper.getVerificationLevel(request), null);
diff --git a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/JSONAPIServlet.java b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/JSONAPIServlet.java
index 78bb3c69..641c09e7 100644
--- a/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/JSONAPIServlet.java
+++ b/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/JSONAPIServlet.java
@@ -154,14 +154,13 @@ public class JSONAPIServlet extends HttpServlet {
if (PDFASSignParameters.Connector.MOA.equals(connectorEnum)
|| PDFASSignParameters.Connector.JKS.equals(connectorEnum)) {
// Plain server based signatures!!
-
PDFASSignResponse pdfasSignResponse = PdfAsHelper.synchronousServerSignature(
inputDocument, parameters, signatureBlockParametersMap);
VerifyResult verifyResult = null;
List<VerifyResult> verResults = PdfAsHelper
- .synchornousVerify(
+ .synchronousVerify(
pdfasSignResponse.getSignedPDF(),
-1,
VerifyParameter.SignatureVerificationLevel.INTEGRITY_ONLY_VERIFICATION,
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 a8beffeb..bc5f2e2d 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
@@ -304,7 +304,7 @@ public class VerifyServlet extends HttpServlet {
logger.debug("Format: " + format);
- List<VerifyResult> results = PdfAsHelper.synchornousVerify(pdfData, -1, lvl,
+ List<VerifyResult> results = PdfAsHelper.synchronousVerify(pdfData, -1, lvl,
PdfAsParameterExtractor.getPreProcessorMap(request));
PdfAsHelper.setVerificationResult(request, results);
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 ccbaf4fb..531abdf1 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
@@ -107,12 +107,13 @@ public class PDFASSigningImpl implements PDFASSigning {
response = PdfAsHelper.synchronousServerSignature(
request.getInputData(), request.getParameters(), request.getSignatureBlockParameters());
+
VerifyResult verifyResult = null;
if (request.getVerificationLevel() != null &&
request.getVerificationLevel().equals(
VerificationLevel.FULL_CERT_PATH)) {
List<VerifyResult> verResults = PdfAsHelper
- .synchornousVerify(
+ .synchronousVerify(
response.getSignedPDF(),
-1,
SignatureVerificationLevel.FULL_VERIFICATION,
@@ -125,7 +126,7 @@ public class PDFASSigningImpl implements PDFASSigning {
verifyResult = verResults.get(verResults.size() - 1);
} else {
List<VerifyResult> verResults = PdfAsHelper
- .synchornousVerify(
+ .synchronousVerify(
response.getSignedPDF(),
-1,
SignatureVerificationLevel.INTEGRITY_ONLY_VERIFICATION,
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 bfdc3bd3..b1bca4ba 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
@@ -71,7 +71,7 @@ public class PDFASVerificationImpl implements PDFASVerification {
statisticEvent.setProfileId(null);
statisticEvent.setDevice(request.getVerificationLevel().toString());
- List<VerifyResult> results = PdfAsHelper.synchornousVerify(
+ List<VerifyResult> results = PdfAsHelper.synchronousVerify(
request.getInputData(), sigIdx, lvl, preProcessor);
for(int i = 0; i < results.size(); i++) {