From 70004e7814f01e866a9a13a6ff51337e260fcad9 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Tue, 16 Mar 2021 16:28:35 +0100 Subject: some small updates in moa-spss module --- .../eaaf/modules/sigverify/moasig/impl/MoaSigInitializer.java | 7 ++++--- .../moasig/impl/data/GenericSignatureVerificationResponse.java | 10 ++++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv') 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 ce98c92b..80244b40 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 @@ -56,6 +56,8 @@ public class MoaSigInitializer { moaSigConfigurator = Configurator.getInstance(); moaSigConfigurator.init(); + //TODO: update initialization if switch to next MOA-SPSS version + moaSigConfig = ConfigurationProvider.getInstance(); log.info("MOA-Sig library initialization complete "); @@ -66,10 +68,9 @@ public class MoaSigInitializer { log.debug("Loaded Security Provider:"); final Provider[] providerList = Security.getProviders(); for (int i = 0; i < providerList.length; i++) { - log.debug( - i + ": " + providerList[i].getName() + " Version " + providerList[i].getVersion()); + log.debug("{}: {} Version {}", i, providerList[i].getName(), providerList[i].getVersion()); + } - } // Inject additional XML schemes diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java index 56054d71..52fedb62 100644 --- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java +++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eaaf/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java @@ -4,13 +4,13 @@ import java.io.Serializable; import java.security.cert.CertificateException; import java.util.Date; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.gv.egiz.eaaf.modules.sigverify.moasig.api.data.IGenericSignatureVerificationResponse; import at.gv.egiz.eaaf.modules.sigverify.moasig.exceptions.MoaSigServiceException; import at.gv.egiz.eaaf.modules.sigverify.moasig.exceptions.MoaSigServiceParserException; - import iaik.x509.X509Certificate; public class GenericSignatureVerificationResponse @@ -103,7 +103,13 @@ public class GenericSignatureVerificationResponse @Override public String getPublicAuthorityCode() { - return this.publicAuthorityCode; + if (StringUtils.isNotEmpty(this.publicAuthorityCode)) { + return this.publicAuthorityCode; + + } else { + return null; + + } } -- cgit v1.2.3