aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/main/java/at')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java
index 08a8dcdf2..9535c9aa3 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java
@@ -5,6 +5,8 @@ import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.math.BigInteger;
+import java.net.MalformedURLException;
+import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -63,7 +65,14 @@ public class PropertyBasedAuthConfigurationProvider extends ConfigurationProvide
public PropertyBasedAuthConfigurationProvider(String fileName) throws ConfigurationException {
File propertiesFile = new File(fileName);
rootConfigFileDir = propertiesFile.getParent();
-
+ try {
+ rootConfigFileDir = new File(rootConfigFileDir).toURI().toURL().toString();
+
+ } catch (MalformedURLException t) {
+ throw new ConfigurationException("config.03", null, t);
+
+ }
+
System.getProperties().setProperty("location", "file:" + fileName);
context = new ClassPathXmlApplicationContext(
new String[] { "moaid.configuration.beans.xml",
@@ -946,7 +955,7 @@ public class PropertyBasedAuthConfigurationProvider extends ConfigurationProvide
@Override
public String getCertstoreDirectory() {
try {
- String path = configuration.getStringValue(
+ String path = rootConfigFileDir + configuration.getStringValue(
MOAIDConfigurationConstants.GENERAL_AUTH_CERTSTORE_URL);
if (MiscUtil.isNotEmpty(path))
return path;
@@ -966,7 +975,7 @@ public class PropertyBasedAuthConfigurationProvider extends ConfigurationProvide
@Override
public String getTrustedCACertificates() {
try {
- String path = configuration.getStringValue(
+ String path = rootConfigFileDir + configuration.getStringValue(
MOAIDConfigurationConstants.GENERAL_AUTH_TRUSTSTORE_URL);
if (MiscUtil.isNotEmpty(path))
return path;