diff options
author | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2008-06-13 11:45:39 +0000 |
---|---|---|
committer | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2008-06-13 11:45:39 +0000 |
commit | 137658e3a41c09b4aa7b9125e4d9f65f16e2facc (patch) | |
tree | 5236993c5202a19ce378bb402944441003e287e4 /src/main/java/at/gv/egiz/pdfas/web | |
parent | b5aefab37c25d5da114bb78768defc79fc709e29 (diff) | |
download | pdf-as-3-137658e3a41c09b4aa7b9125e4d9f65f16e2facc.tar.gz pdf-as-3-137658e3a41c09b4aa7b9125e4d9f65f16e2facc.tar.bz2 pdf-as-3-137658e3a41c09b4aa7b9125e4d9f65f16e2facc.zip |
Detection of incremental updates updated.
Bug fixed. There was an error concerning empty HashInputData parsing a MOA CreateXMLSignatureResponse.
Demo source for API usage created.
Issue resolved: Prevent signature of empty document which leads to a meaningless error message from the bku.
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@284 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/web')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java b/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java index 341b97c..f9cb809 100644 --- a/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java +++ b/src/main/java/at/gv/egiz/pdfas/web/helper/SignServletHelper.java @@ -22,6 +22,7 @@ import at.gv.egiz.pdfas.impl.output.ByteArrayDataSink; import at.gv.egiz.pdfas.impl.output.FileBasedDataSink;
import at.gv.egiz.pdfas.web.SignSessionInformation;
import at.knowcenter.wag.egov.egiz.PdfASID;
+import at.knowcenter.wag.egov.egiz.exceptions.PDFDocumentException;
import at.knowcenter.wag.egov.egiz.exceptions.PresentableException;
import at.knowcenter.wag.egov.egiz.framework.signators.DetachedSignator_1_0_0;
import at.knowcenter.wag.egov.egiz.sig.ConnectorFactory;
@@ -109,6 +110,11 @@ public class SignServletHelper {
log.debug("finishSign:"); //$NON-NLS-1$
+ // check if document is empty
+ if (si.si.getSignatureData() == null || si.si.getSignatureData().getDataSource().getLength() == 0) {
+ throw new PDFDocumentException(250, "The document is empty.");
+ }
+
log.debug("connector = " + si.connector); //$NON-NLS-1$
if (ConnectorFactory.isConnectorLocal(si.connector))
{
|