aboutsummaryrefslogtreecommitdiff
path: root/moaSig/moa-sig-lib/src/main/java/at/gv
diff options
context:
space:
mode:
authortlenz <thomas.lenz@egiz.gv.at>2017-03-01 13:53:14 +0100
committertlenz <thomas.lenz@egiz.gv.at>2017-03-01 13:53:14 +0100
commit2f8ddbd724d8feb6a0b14d83405570bc9c0816db (patch)
tree4a0212d1ffa35eef39e20206c4d73d3406a848d7 /moaSig/moa-sig-lib/src/main/java/at/gv
parentb0980a0e0fc69ff9f1faff0153e1bd0c5ccc3b98 (diff)
downloadmoa-sig-2f8ddbd724d8feb6a0b14d83405570bc9c0816db.tar.gz
moa-sig-2f8ddbd724d8feb6a0b14d83405570bc9c0816db.tar.bz2
moa-sig-2f8ddbd724d8feb6a0b14d83405570bc9c0816db.zip
add TSL client re-initialization process
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;
}