aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-07-23 13:40:18 +0000
committerknowcenter <knowcenter@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2007-07-23 13:40:18 +0000
commit49de61fea3ad3fc7811a537bf8bbffc4cbf618c7 (patch)
tree7f3879186f4d4ea16de4f3230302ebb997f64b90
parent84772ef91127cf3249391edea8107804d05ca461 (diff)
downloadpdf-as-3-49de61fea3ad3fc7811a537bf8bbffc4cbf618c7.tar.gz
pdf-as-3-49de61fea3ad3fc7811a537bf8bbffc4cbf618c7.tar.bz2
pdf-as-3-49de61fea3ad3fc7811a537bf8bbffc4cbf618c7.zip
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@139 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
index cdc0aa8..6ea0a5b 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
@@ -65,6 +65,7 @@ import at.knowcenter.wag.egov.egiz.sig.connectors.bku.SignSignatureObject;
import at.knowcenter.wag.egov.egiz.sig.signatureobject.SignatureObjectHelper;
import at.knowcenter.wag.egov.egiz.tools.CodingHelper;
import at.knowcenter.wag.egov.egiz.tools.Normalizer;
+import at.knowcenter.wag.egov.egiz.web.SessionInformation;
import at.knowcenter.wag.exactparser.ParseDocument;
import at.knowcenter.wag.exactparser.parsing.PDFUtils;
import at.knowcenter.wag.exactparser.parsing.results.HeaderParseResult;
@@ -774,16 +775,25 @@ public abstract class PdfAS
// TODO the choosing algorithm should be extracted into a visitor or factory design pattern.
public static List verifySignatureHoldersWeb(List signature_holders,
- String connector, String loc_ref) throws PDFDocumentException, NormalizeException, SignatureException
+ // String connector, String loc_ref) throws PDFDocumentException, NormalizeException, SignatureException
+ SessionInformation sessionInfo, String loc_ref) throws PDFDocumentException, NormalizeException, SignatureException
{
List results = new ArrayList();
+
for (int i = 0; i < signature_holders.size(); i++)
{
SignatureHolder holder = (SignatureHolder) signature_holders.get(i);
-
- SignatureResponse result = verifyWeb(holder, connector, loc_ref);
+ SignatureResponse result = verifyWeb(holder, sessionInfo.connector, loc_ref);
results.add(result);
+
+ // increment current_operation to be sure that every signature holder is verified
+ // if not incremented, the first document is always verified correctly but other not
+ // because the first document is everytime sent to MOA.
+ // FIXXME: running too slow
+
+ sessionInfo.current_operation++;
}
+
return results;
}
@@ -905,6 +915,7 @@ public abstract class PdfAS
SignSignatureObject so = SignatureObjectHelper.convertSignatureObjectToSignSignatureObject(so_to_be_verified);
String profile = so_to_be_verified.getSignatureTypeDefinition().getType();
+
Connector c = ConnectorChooser.chooseWebConnectorForVerify(connector, so_to_be_verified.getKZ(), so.id, profile, loc_ref);
return c.doVerify(sd, so);