From e1116afd140b5d7e15013b5f1771da46baed554e Mon Sep 17 00:00:00 2001 From: ferbas Date: Mon, 14 Dec 2009 17:41:13 +0000 Subject: new template loading git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@510 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../wag/egov/egiz/sig/connectors/BKUConnector.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 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/BKUConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java index c02b2c9..c425747 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java @@ -22,12 +22,11 @@ import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; -import at.gv.egiz.pdfas.exceptions.ErrorCode; -import at.gv.egiz.pdfas.exceptions.external.ExternalErrorException; - import org.apache.log4j.Level; import org.apache.log4j.Logger; +import at.gv.egiz.pdfas.exceptions.ErrorCode; +import at.gv.egiz.pdfas.exceptions.external.ExternalErrorException; import at.knowcenter.wag.egov.egiz.cfg.ConfigLogger; import at.knowcenter.wag.egov.egiz.cfg.SettingsReader; import at.knowcenter.wag.egov.egiz.exceptions.SettingsException; @@ -39,7 +38,6 @@ import at.knowcenter.wag.egov.egiz.sig.SignatureObject; import at.knowcenter.wag.egov.egiz.sig.SignatureResponse; import at.knowcenter.wag.egov.egiz.sig.X509Cert; import at.knowcenter.wag.egov.egiz.tools.CodingHelper; -import at.knowcenter.wag.egov.egiz.tools.FileHelper; /** * Connector for communicating with BKU. @@ -615,6 +613,8 @@ public class BKUConnector implements LocalConnector return sig_res; } + + public String prepareSignRequest(String userName, String signText, String signType) throws SignatureException @@ -626,8 +626,9 @@ public class BKUConnector implements LocalConnector String keybox_identifier = getSignKeyboxIdentifier(signType); String sign_request_filename = getSignRequestTemplateFileName(signType); - // FIXME[tknall]: might fail since template has been moved to library - String sign_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(sign_request_filename)); + //String sign_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(sign_request_filename)); + String sign_req_str = this.settings_.readInternalResourceAsString(sign_request_filename); + //this.verify_request_template = FileHelper.readFromFile(SettingsReader.relocateFile(verify_request_filename)); if (logger_.isDebugEnabled()) { //logger_.debug(sign_request_filename + "_signText.xml :" + signText); @@ -651,8 +652,9 @@ public class BKUConnector implements LocalConnector SignatureObject sigObject) throws SignatureException { String verify_request = getVerifyRequestTemplateFileName(sigObject.getSignationType()); - // FIXME[tknall]: might fail since template has been moved to library - String verify_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(verify_request)); + + //String verify_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(verify_request)); + String verify_req_str = this.settings_.readInternalResourceAsString(verify_request); if (logger_.isDebugEnabled()) { -- cgit v1.2.3