From 86241863a1aebdc16e3bc273b63e5ce00fb86645 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 2 Nov 2020 12:23:29 +0100 Subject: change order of IAIK CryptoProvider registration Update JWS and JWE impl. to mitigate problems if IAIK and BC provider are loaded --- .../modules/sigverify/moasig/impl/MoaSigInitializer.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'eaaf_modules/eaaf_module_moa-sig') 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 3f2d4593..ce98c92b 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 @@ -9,6 +9,10 @@ import java.util.Map.Entry; import javax.annotation.PostConstruct; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +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; @@ -17,11 +21,6 @@ import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider; import at.gv.egovernment.moaspss.logging.LoggingContext; import at.gv.egovernment.moaspss.logging.LoggingContextManager; import at.gv.egovernment.moaspss.util.DOMUtils; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; - import iaik.asn1.structures.AlgorithmID; import iaik.security.ec.provider.ECCelerate; import iaik.security.provider.IAIK; @@ -48,10 +47,8 @@ public class MoaSigInitializer { log.info("Initializing MOA-Sig signature-verification service ... "); log.info("Loading Java security providers."); - //IAIK.addAsProvider(); - //ECCelerate.addAsProvider(); - Security.addProvider(new IAIK()); - Security.addProvider(new ECCelerate()); + IAIK.addAsProvider(); + ECCelerate.addAsProvider(); try { LoggingContextManager.getInstance().setLoggingContext(new LoggingContext("startup")); -- cgit v1.2.3