aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2015-04-23 17:46:37 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2015-04-23 17:47:01 +0200
commit5e0264a94511844742b09eb4c61940e8b4e10fbd (patch)
tree2525d5a32320f41b03593b1a74fcd45d23da5888 /pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
parent6273b16fa6d462a82467de74ab52140b9e8ee763 (diff)
downloadpdf-as-3-5e0264a94511844742b09eb4c61940e8b4e10fbd.tar.gz
pdf-as-3-5e0264a94511844742b09eb4c61940e8b4e10fbd.tar.bz2
pdf-as-3-5e0264a94511844742b09eb4c61940e8b4e10fbd.zip
X14 handling MOA
Diffstat (limited to 'pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java')
-rw-r--r--pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java22
1 files changed, 21 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 99b39f7..3f24ec1 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
@@ -270,9 +270,11 @@ public class MOASoapWithAttachmentConnector implements Connector {
log.debug("MOA signature detected.");
return prepareXMLContent(data, so);
} else if (SigKZIDHelper.isMOAXAdES14Signed(so)) {
- log.debug("The signature is MOA XAdES 1.4 signed -> getting XML content from DetachedLocRefMOA connector.");
+ log.debug("The signature is MOA XAdES 1.4 signed -> getting different verify template");
+ this.environment.loadXades14();
DetachedLocRefMOAConnector moa_conn = new DetachedLocRefMOAConnector(
this.environment.getProfile(), "loc ref not needed here");
+ moa_conn.loadXades14();
return moa_conn.prepareXMLContent(data, so);
// ATRUST
// MOCCA
@@ -694,6 +696,24 @@ public class MOASoapWithAttachmentConnector implements Connector {
}
+ public void loadXades14() throws ConnectorException {
+
+ SettingsReader settings = null;
+ try {
+ settings = SettingsReader.getInstance();
+ } catch (SettingsException e) {
+ throw new ConnectorException(300, e);
+ }
+
+ String verify_filename = TEMPLATE_FILE_PREFIX
+ + DetachedLocRefMOAIdFormatter.SIG_ID_X14_PREFIX
+ + VERIFY_TEMPLATE_SUFIX;
+ // this.verify_template =
+ // FileHelper.readFromFile(SettingsReader.relocateFile(verify_filename));
+ this.verify_template = settings
+ .readInternalResourceAsString(verify_filename);
+ }
+
public String getProfile() {
return this.profile;
}