From 1b7c56f30ff37596933a904b8ae931be18e9015b Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 30 Aug 2021 10:37:37 +0200 Subject: throw RuntimeException in case of an error during initialization of transaction encryption-layer --- .../java/at/gv/egovernment/moa/id/util/SessionEncrytionUtil.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SessionEncrytionUtil.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SessionEncrytionUtil.java index 498f8408b..d4a6ee786 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SessionEncrytionUtil.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SessionEncrytionUtil.java @@ -32,14 +32,15 @@ public class SessionEncrytionUtil extends AbstractEncrytionUtil { private static String key = null; public static SessionEncrytionUtil getInstance() { - if (instance == null) { + if (instance == null) { try { key = AuthConfigurationProviderFactory.getInstance().getMOASessionEncryptionKey(); - instance = new SessionEncrytionUtil(); + instance = new SessionEncrytionUtil(); } catch (Exception e) { Logger.warn("MOASession encryption can not be inizialized.", e); - + throw new RuntimeException("MOASession encryption can not be inizialized.", e); + } } return instance; -- cgit v1.2.3