aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
diff options
context:
space:
mode:
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;
}