diff options
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java | 17 |
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);
|