summaryrefslogtreecommitdiff
path: root/eaaf_modules/eaaf_module_moa-sig/src
diff options
context:
space:
mode:
authorThomas <>2021-03-25 17:50:35 +0100
committerThomas <>2021-03-25 17:50:35 +0100
commitb5c9155b3ec502b3969ead49198980ce44c6d743 (patch)
tree40abb6427566da145fe66369810a5f30967f5377 /eaaf_modules/eaaf_module_moa-sig/src
parente62a856f255163ecc145c16130d15147152bc0fd (diff)
downloadEAAF-Components-b5c9155b3ec502b3969ead49198980ce44c6d743.tar.gz
EAAF-Components-b5c9155b3ec502b3969ead49198980ce44c6d743.tar.bz2
EAAF-Components-b5c9155b3ec502b3969ead49198980ce44c6d743.zip
switch to latest version of MOA-Sig
Diffstat (limited to 'eaaf_modules/eaaf_module_moa-sig/src')
-rw-r--r--eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/AbstractSignatureService.java4
-rw-r--r--eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/MoaSigInitializer.java22
-rw-r--r--eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/SignatureVerificationService.java21
3 files changed, 18 insertions, 29 deletions
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/AbstractSignatureService.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/AbstractSignatureService.java
index b9219ee4..942cd35c 100644
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/AbstractSignatureService.java
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/AbstractSignatureService.java
@@ -53,7 +53,7 @@ public abstract class AbstractSignatureService {
if (txMgr.getTransactionContext() == null) {
log.debug("Set not MOA-Sig transaction context");
final TransactionContext ctx =
- new TransactionContext(transactionID, null, moaSigConfig.getMoaSigConfig());
+ new TransactionContext(transactionID, null, moaSigConfig.getConfigHolder().getMoaSpssConfig());
txMgr.setTransactionContext(ctx);
}
@@ -72,7 +72,7 @@ public abstract class AbstractSignatureService {
}
- new IaikConfigurator().configure(moaSigConfig.getMoaSigConfig());
+ new IaikConfigurator().configure(moaSigConfig.getConfigHolder().getMoaSpssConfig());
}
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/MoaSigInitializer.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/MoaSigInitializer.java
index 80244b40..dc4aa4c0 100644
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/MoaSigInitializer.java
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/MoaSigInitializer.java
@@ -15,9 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import at.gv.egiz.eaaf.modules.sigverify.moasig.api.data.ISchemaRessourceProvider;
import at.gv.egiz.eaaf.modules.sigverify.moasig.exceptions.MoaSigServiceConfigurationException;
-import at.gv.egovernment.moa.spss.MOAException;
-import at.gv.egovernment.moa.spss.api.Configurator;
-import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.init.StartupConfigurationHolder;
+import at.gv.egovernment.moa.spss.server.init.SystemInitializer;
import at.gv.egovernment.moaspss.logging.LoggingContext;
import at.gv.egovernment.moaspss.logging.LoggingContextManager;
import at.gv.egovernment.moaspss.util.DOMUtils;
@@ -36,10 +35,7 @@ public class MoaSigInitializer {
* Get MOA-Sig configuration object.
*/
@Getter
- private Configurator moaSigConfigurator;
-
- @Getter
- private ConfigurationProvider moaSigConfig;
+ private StartupConfigurationHolder configHolder;
@PostConstruct
@@ -53,13 +49,7 @@ public class MoaSigInitializer {
try {
LoggingContextManager.getInstance().setLoggingContext(new LoggingContext("startup"));
log.debug("MOA-Sig library initialization process ... ");
- moaSigConfigurator = Configurator.getInstance();
- moaSigConfigurator.init();
-
- //TODO: update initialization if switch to next MOA-SPSS version
-
- moaSigConfig = ConfigurationProvider.getInstance();
-
+ configHolder = SystemInitializer.init();
log.info("MOA-Sig library initialization complete ");
fixJava8_141ProblemWithSslAlgorithms();
@@ -94,8 +84,8 @@ public class MoaSigInitializer {
}
}
- } catch (final MOAException e) {
- log.error("MOA-SP initialization FAILED!", e.getWrapped());
+ } catch (final RuntimeException e) {
+ log.error("MOA-SP initialization FAILED!", e);
throw new MoaSigServiceConfigurationException("service.moasig.04",
new Object[] { e.toString() }, e);
}
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/SignatureVerificationService.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/SignatureVerificationService.java
index 9ee6d0aa..854718e5 100644
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/SignatureVerificationService.java
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/SignatureVerificationService.java
@@ -9,6 +9,16 @@ import java.util.Map;
import javax.annotation.PostConstruct;
+import org.apache.commons.lang3.time.DateFormatUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.lang.Nullable;
+import org.springframework.stereotype.Service;
+import org.springframework.util.Base64Utils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
import at.gv.egiz.eaaf.modules.sigverify.moasig.api.ISignatureVerificationService;
import at.gv.egiz.eaaf.modules.sigverify.moasig.api.data.ICmsSignatureVerificationResponse;
import at.gv.egiz.eaaf.modules.sigverify.moasig.api.data.IXmlSignatureVerificationResponse;
@@ -28,16 +38,6 @@ import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker;
import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureVerificationInvoker;
import at.gv.egovernment.moaspss.util.Constants;
-import org.apache.commons.lang3.time.DateFormatUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.lang.Nullable;
-import org.springframework.stereotype.Service;
-import org.springframework.util.Base64Utils;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
/**
* MOA-Sig based signature verification implementation.
*
@@ -396,7 +396,6 @@ public class SignatureVerificationService extends AbstractSignatureService
t);
}
-
}
@PostConstruct