aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv/egiz/pdfas
diff options
context:
space:
mode:
authorAlexander Marsalek <amarsalek@iaik.tugraz.at>2021-04-08 19:49:03 +0200
committerAlexander Marsalek <amarsalek@iaik.tugraz.at>2021-04-08 20:11:33 +0200
commit1263be201c27b6e96cc9975a6dddd5a9f1306c77 (patch)
tree581db79a57efc61fd2d44e46bf91cdc40ee6956a /pdf-as-web/src/main/java/at/gv/egiz/pdfas
parentb51e3b877fa7c8b930e63fd8e1317e34d7d4773e (diff)
downloadpdf-as-4-1263be201c27b6e96cc9975a6dddd5a9f1306c77.tar.gz
pdf-as-4-1263be201c27b6e96cc9975a6dddd5a9f1306c77.tar.bz2
pdf-as-4-1263be201c27b6e96cc9975a6dddd5a9f1306c77.zip
typo
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/helper/PdfAsHelper.java14
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/JSONAPIServlet.java11
-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.java6
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/ws/PDFASVerificationImpl.java2
5 files changed, 14 insertions, 21 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 11ee4790..3262c102 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();
@@ -522,8 +522,8 @@ public class PdfAsHelper {
* @return The signed pdf data
* @throws Exception
*/
- public static PDFASSignResponse synchornousServerSignature(byte[] pdfData,
- PDFASSignParameters params) throws Exception {
+ public static PDFASSignResponse synchronousServerSignature(byte[] pdfData,
+ PDFASSignParameters params) throws Exception {
Configuration config = pdfAs.getConfiguration();
if (WebConfiguration.isAllowExtOverwrite() && params.getOverrides() != null) {
@@ -1283,7 +1283,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 13d874e8..7d01cdcc 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
@@ -1,9 +1,7 @@
package at.gv.egiz.pdfas.web.servlets;
import at.gv.egiz.pdfas.api.ws.PDFASSignParameters;
-import at.gv.egiz.pdfas.api.ws.PDFASSignRequest;
import at.gv.egiz.pdfas.api.ws.PDFASSignResponse;
-import at.gv.egiz.pdfas.api.ws.VerificationLevel;
import at.gv.egiz.pdfas.common.exceptions.PDFASError;
import at.gv.egiz.pdfas.lib.api.verify.VerifyParameter;
import at.gv.egiz.pdfas.lib.api.verify.VerifyResult;
@@ -15,10 +13,8 @@ import at.gv.egiz.pdfas.web.helper.JSONStartResponse;
import at.gv.egiz.pdfas.web.helper.PdfAsHelper;
import at.gv.egiz.pdfas.web.stats.StatisticEvent;
import at.gv.egiz.pdfas.web.stats.StatisticFrontend;
-import at.gv.egiz.pdfas.web.store.RequestStore;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.IOUtils;
-import org.json.HTTP;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -27,11 +23,8 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.xml.ws.WebServiceException;
-import java.io.BufferedReader;
import java.io.IOException;
import java.util.List;
-import java.util.Map;
/**
* Created by Andreas Fitzek on 6/23/16.
@@ -142,13 +135,13 @@ public class JSONAPIServlet extends HttpServlet {
if (PDFASSignParameters.Connector.MOA.equals(connectorEnum)
|| PDFASSignParameters.Connector.JKS.equals(connectorEnum)) {
// Plain server based signatures!!
- PDFASSignResponse pdfasSignResponse = PdfAsHelper.synchornousServerSignature(
+ PDFASSignResponse pdfasSignResponse = PdfAsHelper.synchronousServerSignature(
inputDocument, parameters);
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 f850c5ae..5f8fc343 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
@@ -104,7 +104,7 @@ public class PDFASSigningImpl implements PDFASSigning {
|| request.getParameters().getConnector()
.equals(Connector.JKS)) {
// Plain server based signatures!!
- response = PdfAsHelper.synchornousServerSignature(
+ response = PdfAsHelper.synchronousServerSignature(
request.getInputData(), request.getParameters());
VerifyResult verifyResult = null;
@@ -112,7 +112,7 @@ public class PDFASSigningImpl implements PDFASSigning {
request.getVerificationLevel().equals(
VerificationLevel.FULL_CERT_PATH)) {
List<VerifyResult> verResults = PdfAsHelper
- .synchornousVerify(
+ .synchronousVerify(
response.getSignedPDF(),
-1,
SignatureVerificationLevel.FULL_VERIFICATION,
@@ -125,7 +125,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++) {