From bea447f643c2ca8f6c2d770b826f84b840488a54 Mon Sep 17 00:00:00 2001 From: tlenz Date: Thu, 8 Feb 2018 12:56:43 +0100 Subject: add Servlet to ask for TSL client status --- .../at/gv/egovernment/moa/spss/tsl/TSLServiceFactory.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/tsl/TSLServiceFactory.java') diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/tsl/TSLServiceFactory.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/tsl/TSLServiceFactory.java index 6463745..bc902f2 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/tsl/TSLServiceFactory.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/tsl/TSLServiceFactory.java @@ -5,6 +5,7 @@ import at.gv.egovernment.moa.sig.tsl.api.ITslService; import at.gv.egovernment.moa.sig.tsl.config.TslConfigurationImpl; import at.gv.egovernment.moa.sig.tsl.exception.TslException; import at.gv.egovernment.moa.sig.tsl.pki.chaining.ChainingTrustStoreHandler; +import at.gv.egovernment.moa.spss.server.monitoring.ServiceStatusContainer; import at.gv.egovernment.moa.spss.util.MessageProvider; import at.gv.egovernment.moaspss.logging.LogMsg; import at.gv.egovernment.moaspss.logging.Logger; @@ -23,9 +24,18 @@ public class TSLServiceFactory { TrustStoreFactory.addTrustStoreHandler(new ChainingTrustStoreHandler()); + //set global TSL client status + ServiceStatusContainer.setStatus(true); + ServiceStatusContainer.setStatusMsg(ServiceStatusContainer.STATUS_OK); + } catch (TslException e) { Logger.fatal(new LogMsg(MessageProvider.getInstance().getMessage("init.05", new Object[]{e.getMessage()})), e); - + + //set global TSL client status + ServiceStatusContainer.setStatus(false); + ServiceStatusContainer.setStatusMsg( + new LogMsg(MessageProvider.getInstance().getMessage("init.05", new Object[]{e.getMessage()})).toString()); + } } else { -- cgit v1.2.3