summaryrefslogtreecommitdiff
path: root/eaaf_modules/eaaf_module_auth_sl20/src
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2021-02-19 15:56:24 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2021-02-19 15:56:24 +0100
commitd54c57cda552224f90961f8b2036389551bc3329 (patch)
treee3226384226bf12d6009b8a3edf23e8feb9145d0 /eaaf_modules/eaaf_module_auth_sl20/src
parentc65863f0f1e437960d07cfecb789df9efc04681d (diff)
parent2b77cd297aee2081ad8c99ba9f79483cf35178a7 (diff)
downloadEAAF-Components-d54c57cda552224f90961f8b2036389551bc3329.tar.gz
EAAF-Components-d54c57cda552224f90961f8b2036389551bc3329.tar.bz2
EAAF-Components-d54c57cda552224f90961f8b2036389551bc3329.zip
Merge branch 'feature/small_changes' into 'nightlyBuild'
Feature/small changes See merge request egiz/eaaf_components!16
Diffstat (limited to 'eaaf_modules/eaaf_module_auth_sl20/src')
-rw-r--r--eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java13
-rw-r--r--eaaf_modules/eaaf_module_auth_sl20/src/test/resources/data/hsm_facade_trust_root.crt18
2 files changed, 18 insertions, 13 deletions
diff --git a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java
index 63bf7897..a1d5591a 100644
--- a/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java
+++ b/eaaf_modules/eaaf_module_auth_sl20/src/main/java/at/gv/egiz/eaaf/modules/auth/sl20/tasks/AbstractCreateQualEidRequestTask.java
@@ -1,7 +1,8 @@
package at.gv.egiz.eaaf.modules.auth.sl20.tasks;
import java.io.Serializable;
-import java.net.ConnectException;
+import java.net.SocketException;
+import java.net.SocketTimeoutException;
import java.nio.charset.StandardCharsets;
import java.security.cert.CertificateEncodingException;
import java.util.ArrayList;
@@ -63,7 +64,8 @@ public abstract class AbstractCreateQualEidRequestTask extends AbstractAuthServl
log.debug("Starting SL2.0 authentication process .... ");
revisionsLogger.logEvent(pendingReq, EventCodes.AUTHPROCESS_SL20_SELECTED, "sl20auth");
-
+
+ String vdaQualEidDUrl = null;
try {
// get service-provider configuration
final ISpConfiguration oaConfig = pendingReq.getServiceProviderConfiguration();
@@ -75,7 +77,7 @@ public abstract class AbstractCreateQualEidRequestTask extends AbstractAuthServl
}
// get basic configuration parameters
- final String vdaQualEidDUrl = extractVdaUrlForSpecificOa(oaConfig, executionContext);
+ vdaQualEidDUrl = extractVdaUrlForSpecificOa(oaConfig, executionContext);
if (StringUtils.isEmpty(vdaQualEidDUrl)) {
log.error("NO VDA URL for qualified eID (" + Constants.CONFIG_PROP_VDA_ENDPOINT_QUALeID_DEFAULT + ")");
throw new SL20Exception("sl20.03", new Object[] { "NO VDA URL for qualified eID" });
@@ -191,8 +193,9 @@ public abstract class AbstractCreateQualEidRequestTask extends AbstractAuthServl
} catch (final EaafAuthenticationException e) {
throw new TaskExecutionException(pendingReq, "SL2.0 Authentication FAILED. Msg: " + e.getMessage(), e);
- } catch (final ConnectException e) {
- log.error("SL2.0 Authentication has a VDA connector error.", e);
+ } catch (final SocketException | SocketTimeoutException e) {
+ log.error("SL2.0 Authentication has a VDA connector error. Endpoint: {}",
+ vdaQualEidDUrl, e);
throw new TaskExecutionException(pendingReq, e.getMessage(),
new SL20Exception("sl20.02", new Object[] { e.getMessage()}, e));
diff --git a/eaaf_modules/eaaf_module_auth_sl20/src/test/resources/data/hsm_facade_trust_root.crt b/eaaf_modules/eaaf_module_auth_sl20/src/test/resources/data/hsm_facade_trust_root.crt
index 01be3821..204ddccf 100644
--- a/eaaf_modules/eaaf_module_auth_sl20/src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