aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib')
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
index 3f24ec1..dd13908 100644
--- a/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
+++ b/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
@@ -192,13 +192,34 @@ public class MOASoapWithAttachmentConnector implements Connector {
String verify_request_xml = prepareVerifyRequest(data, so, dsig);
log.debug("verify_request_xml = " + verify_request_xml); //$NON-NLS-1$
-
+ log.debug("ID: " + so.id);
String url = this.environment.getVerifyURL();
Properties response_properties = sendRequest(url,
MOASoapConnection.SERVICE_VERIFY, verify_request_xml, data);
SignatureResponse signature_response = analyzeVerifyResponse(response_properties);
+ if("2".equals(signature_response.getSignatureCheckCode()) &&
+ so.id != null && so.id.startsWith(DetachedLocRefMOAIdFormatter.SIG_ID_PREFIX)) {
+ log.debug("Retrying using X14 for MOA");
+
+ so.id = DetachedLocRefMOAIdFormatter.SIG_ID_X14_PREFIX;
+
+ verify_request_xml = prepareVerifyRequest(data, so, dsig);
+ log.debug("verify_request_xml = " + verify_request_xml); //$NON-NLS-1$
+ log.debug("ID: " + so.id);
+ url = this.environment.getVerifyURL();
+ response_properties = sendRequest(url,
+ MOASoapConnection.SERVICE_VERIFY, verify_request_xml, data);
+
+ SignatureResponse signature_response2 = analyzeVerifyResponse(response_properties);
+
+ if("0".equals(signature_response2.getSignatureCheckCode())) {
+ log.debug("doVerify finished."); //$NON-NLS-1$
+ return signature_response2;
+ }
+ }
+
log.debug("doVerify finished."); //$NON-NLS-1$
return signature_response;
}