From b67ce8b23cf6b065eb922f5bd224722bfca8f7e8 Mon Sep 17 00:00:00 2001 From: knowcenter Date: Fri, 1 Jun 2007 08:34:56 +0000 Subject: detached moa git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@117 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../sig/connectors/bku/DetachedBKUConnector.java | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/sig') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/DetachedBKUConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/DetachedBKUConnector.java index d018a13..9713a4a 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/DetachedBKUConnector.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/DetachedBKUConnector.java @@ -18,6 +18,7 @@ import at.knowcenter.wag.egov.egiz.sig.SignatureResponse; import at.knowcenter.wag.egov.egiz.sig.connectors.Connector; import at.knowcenter.wag.egov.egiz.sig.connectors.LocalConnector; import at.knowcenter.wag.egov.egiz.sig.connectors.TemplateReplaces; +import at.knowcenter.wag.egov.egiz.sig.connectors.moa.DetachedLocRefMOAConnector; import at.knowcenter.wag.egov.egiz.sig.sigid.DetachedIdFormatter; import at.knowcenter.wag.egov.egiz.sig.sigkz.SigKZIDHelper; import at.knowcenter.wag.egov.egiz.tools.CodingHelper; @@ -296,13 +297,9 @@ public class DetachedBKUConnector implements Connector, LocalConnector String xml_content = null; if (SigKZIDHelper.isMOASigned(so)) { - // TODO once the detached moa connector is fully functional - implement this. - log.error("Zur Zeit gibt es keinen detached MOA connector fuer die Verifikation."); - throw new ConnectorException(300, "Detached MOA is disabled."); - // MOAConnector moa_conn = new MOAConnector(); - // // get the MOA-template - // verify_template_str = moa_conn.getVerifyTemplate(normalizedText, - // sigObject); + log.debug("The signature is MOA signed -> getting XML content from DetachedLocRefMOA connector."); + DetachedLocRefMOAConnector moa_conn = new DetachedLocRefMOAConnector(this.environment.getProfile(), "loc ref not needed here"); + xml_content = moa_conn.prepareXMLContent(data, so); } else { @@ -485,6 +482,8 @@ public class DetachedBKUConnector implements Connector, LocalConnector */ protected static final String RSA_CERT_ALG_KEY = "cert.alg.rsa"; //$NON-NLS-1$ + protected String profile = null; + protected String loc_ref_content = null; protected String sign_keybox_identifier = null; @@ -513,6 +512,8 @@ public class DetachedBKUConnector implements Connector, LocalConnector */ public Environment(String profile, String loc_ref_content) throws ConnectorException { + this.profile = profile; + this.loc_ref_content = loc_ref_content; SettingsReader settings = null; @@ -560,6 +561,11 @@ public class DetachedBKUConnector implements Connector, LocalConnector } + public String getProfile() + { + return this.profile; + } + /** * Returns the LocRef content. * -- cgit v1.2.3