From d1cfa0cf4975387f808de22f99d1c5dc7a515457 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 12 Sep 2018 12:53:43 +0200 Subject: add some internal checks --- .../modules/authmodule_eIDASv2/szr/SZRClient.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'eidas_modules/authmodule-eIDAS-v2') diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java index 458305c6..81d1d657 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java @@ -231,14 +231,30 @@ public class SZRClient { } + //check if Clients can be initialized + if (szr == null ) { + log.error("SZR " + CLIENT_DEFAULT + " is 'NULL'. Something goes wrong"); + throw new RuntimeException("SZR " + CLIENT_DEFAULT + " is 'NULL'. Something goes wrong"); + + } + if (dispatch == null ) { + log.error("SZR " + CLIENT_RAW + " is 'NULL'. Something goes wrong"); + throw new RuntimeException("SZR " + CLIENT_RAW + " is 'NULL'. Something goes wrong"); + + } + + //inject handler log.info("Use SZR service-URL: " + szrURL); injectBindingProvider((BindingProvider) szr, CLIENT_DEFAULT); injectBindingProvider((BindingProvider) dispatch, CLIENT_RAW); + //inject http parameters and SSL context log.debug("Inject HTTP client settings ... "); injectHTTPClient(szr, CLIENT_DEFAULT); injectHTTPClient(dispatch, CLIENT_RAW); + + log.info("SZR-Client initialization successfull"); } -- cgit v1.2.3