aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java57
1 files changed, 30 insertions, 27 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
index 1d310cf..a111ca5 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
@@ -214,36 +214,39 @@ public class MOASoapWithAttachmentConnector implements Connector
return verify_request_xml;
}
- private String chooseAndCreateXMLDsig(SignatureData data, SignSignatureObject so) throws ConnectorException {
+ private String chooseAndCreateXMLDsig(SignatureData data, SignSignatureObject so) throws ConnectorException {
// MOA
- if (SigKZIDHelper.isMOASigned(so)) {
- log.debug("MOA signature detected.");
- return prepareXMLContent(data, so);
-
- // MOCCA
- } else if (SigKZIDHelper.isMOCCASigned(so)) {
- log.debug("MOCCA signature detected.");
- String algorithmId = SigKZIDHelper.parseAlgorithmId(so.id);
- log.debug("Algorithm = " + algorithmId);
- LocRefDetachedMOCCAConnector mocca_connector = new LocRefDetachedMOCCAConnector(this.params, "not needed here", algorithmId);
- return mocca_connector.prepareXMLContent(data, so);
-
- // ATrust
- } else if (SigKZIDHelper.isATrustSigned(so)) {
- log.debug("A-Trust signature detected.");
- this.environment.reInitVerifyTemplate(ATRUST_VERIFY_TEMPLATE_KEY);
- return prepareXMLContent(data, so);
-
- // TD
- } else {
- log.debug("TD signature signature detected.");
- DetachedBKUConnector bku_connector = new DetachedBKUConnector(this.params, "not needed here");
- return bku_connector.prepareXMLContent(data, so);
- }
+ if (SigKZIDHelper.isMOASigned(so)) {
+ log.debug("MOA signature detected.");
+ return prepareXMLContent(data, so);
+
+ // MOCCA
+ } else if (SigKZIDHelper.isMOCCASigned(so)) {
+ log.debug("MOCCA signature detected.");
+ String algorithmId = SigKZIDHelper.parseAlgorithmId(so.id);
+ log.debug("Algorithm = " + algorithmId);
+ LocRefDetachedMOCCAConnector mocca_connector = new LocRefDetachedMOCCAConnector(this.params, "not needed here", algorithmId);
+ return mocca_connector.prepareXMLContent(data, so);
+
+ // ATrust
+ } else if (SigKZIDHelper.isATrustSigned(so)) {
+ log.debug("A-Trust signature detected.");
+ this.environment.reInitVerifyTemplate(ATRUST_VERIFY_TEMPLATE_KEY);
+ return prepareXMLContent(data, so);
+
+ // TD bku
+ } else if (SigKZIDHelper.isBKUSigned(so)) {
+ log.debug("TD bku signature detected.");
+ DetachedBKUConnector bku_connector = new DetachedBKUConnector(this.params, "not needed here");
+ return bku_connector.prepareXMLContent(data, so);
+ } else {
+ throw new ConnectorException(ErrorCode.UNSUPPORTED_SIGNATURE_METHOD, "unsupported signature, get a new pdf-as version. " + so.id + ", " +so.kz);
+
+ }
}
-
-/**
+
+ /**
* Analyzes the verify response string.
*
* @param response_properties