aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2018-09-12 12:53:43 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2018-09-12 12:53:43 +0200
commitd1cfa0cf4975387f808de22f99d1c5dc7a515457 (patch)
tree0da57c7ea545e7637928103e1b57b14c610f63c6 /eidas_modules
parentce81f8b4f430862a3dab7c9ae3168051972d7cea (diff)
downloadNational_eIDAS_Gateway-d1cfa0cf4975387f808de22f99d1c5dc7a515457.tar.gz
National_eIDAS_Gateway-d1cfa0cf4975387f808de22f99d1c5dc7a515457.tar.bz2
National_eIDAS_Gateway-d1cfa0cf4975387f808de22f99d1c5dc7a515457.zip
add some internal checks
Diffstat (limited to 'eidas_modules')
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java16
1 files changed, 16 insertions, 0 deletions
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");
}