aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-moa/src/main/java/at/gv/egiz/pdfas
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-15 18:07:20 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-15 18:07:20 +0200
commit0b663afa4d0167df1e838e1f37bb5862e8951037 (patch)
tree1b962dedd3c2e1eba042c89fbf6191b42218bd36 /pdf-as-moa/src/main/java/at/gv/egiz/pdfas
parentd9dcd54eae2b3a8e46dce69c96eca7c97f1be429 (diff)
downloadpdf-as-4-0b663afa4d0167df1e838e1f37bb5862e8951037.tar.gz
pdf-as-4-0b663afa4d0167df1e838e1f37bb5862e8951037.tar.bz2
pdf-as-4-0b663afa4d0167df1e838e1f37bb5862e8951037.zip
PDF-AS Errorhandling redesign only PDFASError Exceptions are returned
!
Diffstat (limited to 'pdf-as-moa/src/main/java/at/gv/egiz/pdfas')
-rw-r--r--pdf-as-moa/src/main/java/at/gv/egiz/pdfas/moa/MOAConnector.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/pdf-as-moa/src/main/java/at/gv/egiz/pdfas/moa/MOAConnector.java b/pdf-as-moa/src/main/java/at/gv/egiz/pdfas/moa/MOAConnector.java
index 405c02a6..d79320e3 100644
--- a/pdf-as-moa/src/main/java/at/gv/egiz/pdfas/moa/MOAConnector.java
+++ b/pdf-as-moa/src/main/java/at/gv/egiz/pdfas/moa/MOAConnector.java
@@ -49,6 +49,8 @@ import at.gv.e_government.reference.namespace.moa._20020822.MetaInfoType;
import at.gv.e_government.reference.namespace.moa._20020822_.MOAFault;
import at.gv.e_government.reference.namespace.moa._20020822_.SignatureCreationPortType;
import at.gv.e_government.reference.namespace.moa._20020822_.SignatureCreationService;
+import at.gv.egiz.pdfas.common.exceptions.PDFASError;
+import at.gv.egiz.pdfas.common.exceptions.PdfAsErrorCarrier;
import at.gv.egiz.pdfas.common.exceptions.PdfAsException;
import at.gv.egiz.pdfas.common.exceptions.PdfAsMOAException;
import at.gv.egiz.pdfas.common.exceptions.PdfAsSignatureException;
@@ -194,8 +196,13 @@ public class MOAConnector implements ISignatureConnector,
// done the signature!
byte[] cmsSignatureData = (byte[])resp;
- VerifyResult verifyResult = SignatureUtils
- .verifySignature(cmsSignatureData, input);
+ VerifyResult verifyResult;
+ try {
+ verifyResult = SignatureUtils
+ .verifySignature(cmsSignatureData, input);
+ } catch (PDFASError e) {
+ throw new PdfAsErrorCarrier(e);
+ }
if (!StreamUtils.dataCompare(requestedSignature
.getCertificate().getFingerprintSHA(),