aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-moa/src/main/java/at/gv/egiz/pdfas
diff options
context:
space:
mode:
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(),