aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-02-05 10:55:04 +0100
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-02-05 10:55:04 +0100
commita0bfe818095656234eca2f5cbaa093ea49a0122d (patch)
tree0c634a9d09453247beb4a4de9b4a373f91010554 /pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets
parenta8183a22b3a5bd9b062a1cded09a75ec8fa3be8e (diff)
downloadpdf-as-4-a0bfe818095656234eca2f5cbaa093ea49a0122d.tar.gz
pdf-as-4-a0bfe818095656234eca2f5cbaa093ea49a0122d.tar.bz2
pdf-as-4-a0bfe818095656234eca2f5cbaa093ea49a0122d.zip
MOA-SS integration done
Diffstat (limited to 'pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets')
-rw-r--r--pdf-as-web/src/main/java/at/gv/egiz/pdfas/web/servlets/ExternSignServlet.java32
1 files changed, 32 insertions, 0 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 dddd80dd..fe26f097 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
@@ -235,9 +235,41 @@ public class ExternSignServlet extends HttpServlet {
IPlainSigner signer;
if (connector.equals("bku") || connector.equals("onlinebku") || connector.equals("mobilebku")) {
// start asynchronous signature creation
+
+ if(connector.equals("bku")) {
+ if(WebConfiguration.getLocalBKUURL() == null) {
+ throw new PdfAsWebException("Invalid connector bku is not supported");
+ }
+ }
+
+ if(connector.equals("onlinebku")) {
+ if(WebConfiguration.getLocalBKUURL() == null) {
+ throw new PdfAsWebException("Invalid connector onlinebku is not supported");
+ }
+ }
+
+ if(connector.equals("mobilebku")) {
+ if(WebConfiguration.getLocalBKUURL() == null) {
+ throw new PdfAsWebException("Invalid connector mobilebku is not supported");
+ }
+ }
+
PdfAsHelper.startSignature(request, response, getServletContext(), pdfData);
} else if (connector.equals("jks") || connector.equals("moa")) {
// start synchronous siganture creation
+
+ if(connector.equals("jks")) {
+ if(!WebConfiguration.getKeystoreEnabled()) {
+ throw new PdfAsWebException("Invalid connector jks is not supported");
+ }
+ }
+
+ if(connector.equals("moa")) {
+ if(!WebConfiguration.getMOASSEnabled()) {
+ throw new PdfAsWebException("Invalid connector moa is not supported");
+ }
+ }
+
byte[] pdfSignedData = PdfAsHelper.synchornousSignature(request,
response, pdfData);
PdfAsHelper.setSignedPdf(request, response, pdfSignedData);