aboutsummaryrefslogtreecommitdiff
path: root/moaSig/moa-sig-lib/src/main/java/at/gv
diff options
context:
space:
mode:
Diffstat (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv')
-rw-r--r--moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/tsl/TSLServiceFactory.java10
1 files changed, 8 insertions, 2 deletions
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 223361d..6463745 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
@@ -13,12 +13,13 @@ import iaik.pki.store.truststore.TrustStoreFactory;
public class TSLServiceFactory {
private static ITslService tslClient = null;
-
+ private static TslConfigurationImpl interalConfig;
public static void initialize(TslConfigurationImpl config) {
if (tslClient == null) {
try {
- tslClient = TslClientFactory.buildTslService(config );
+ interalConfig = config;
+ tslClient = TslClientFactory.buildTslService(interalConfig);
TrustStoreFactory.addTrustStoreHandler(new ChainingTrustStoreHandler());
@@ -44,6 +45,11 @@ public class TSLServiceFactory {
}
public static ITslService getTSLServiceClient() {
+ if (!isInitialized()) {
+ Logger.warn("TSL client is not initialized but config is available. Starting new initialization process ...");
+ initialize(interalConfig);
+ }
+
return tslClient;
}