aboutsummaryrefslogtreecommitdiff
path: root/spss/server
diff options
context:
space:
mode:
Diffstat (limited to 'spss/server')
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java33
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java3
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java2
3 files changed, 29 insertions, 9 deletions
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java
index 40416f121..2a2427bbb 100644
--- a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java
@@ -29,6 +29,8 @@ import iaik.ixsil.exceptions.URIException;
import iaik.ixsil.util.URI;
import iaik.pki.pathvalidation.ChainingModes;
import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.server.modules.xml.BlackListEntry;
+import iaik.server.modules.xml.ExternalReferenceChecker;
import iaik.utils.RFC2253NameParser;
import iaik.utils.RFC2253NameParserException;
@@ -385,11 +387,16 @@ public class ConfigurationPartsBuilder {
Element permitExtUris = (Element)XPathUtils.selectSingleNode(getConfigElem(), PERMIT_EXTERNAL_URIS_XPATH);
// if PermitExternalUris element does not exist - don't allow external uris
- if (permitExtUris == null)
- return false;
- else
+ if (permitExtUris == null) {
+ // set permitExtUris for iaik-moa
+ ExternalReferenceChecker.setPermitExternalURLs(false);
+ return false;
+ }
+ else {
+ // set permitExtUris for iaik-moa
+ ExternalReferenceChecker.setPermitExternalURLs(true);
return true;
-
+ }
}
/**
@@ -401,6 +408,7 @@ public class ConfigurationPartsBuilder {
info("config.33", null);
List blacklist = new ArrayList();
+ List blackListIaikMoa = new ArrayList();
NodeIterator permitExtIter = XPathUtils.selectNodeIterator(
getConfigElem(),
@@ -411,11 +419,19 @@ public class ConfigurationPartsBuilder {
String host = getElementValue(permitExtElem, CONF + "IP", null);
String port = getElementValue(permitExtElem, CONF + "Port", null);
-
- if (port == null)
+ BlackListEntry entry =null;
+ if (port == null) {
+ entry = new BlackListEntry(host, -1);
info("config.34", new Object[]{host});
- else
+ }
+ else {
+ entry = new BlackListEntry(host, new Integer(port).intValue());
info("config.34", new Object[]{host + ":" + port});
+ }
+
+ // add entry to iaik-moa blacklist
+ blackListIaikMoa.add(entry);
+
String array[] = new String[2];
array[0] = host;
@@ -424,6 +440,9 @@ public class ConfigurationPartsBuilder {
}
+ // set blacklist for iaik-moa
+ ExternalReferenceChecker.setBlacklist(blackListIaikMoa);
+
if(blacklist.isEmpty()) // no blacklisted uris given
info("config.36", null);
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java
index a5f861c52..cae1497d6 100644
--- a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java
@@ -367,7 +367,7 @@ public class ConfigurationProvider
allowExternalUris_= builder.allowExternalUris();
- if (allowExternalUris_)
+ if (allowExternalUris_)
blackListedUris_ = builder.buildPermitExternalUris();
else {
info("config.35", null);
@@ -375,6 +375,7 @@ public class ConfigurationProvider
}
+
// Set set = crlRetentionIntervals.entrySet();
// Iterator i = set.iterator();
// while(i.hasNext()){
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java
index 722d5350c..dd5436827 100644
--- a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java
@@ -83,7 +83,7 @@ public class IaikExceptionMapper {
{ iaik.server.modules.xmlverify.SignerCertificateUnavailableException.class, "2243", MOAApplicationException.class },
{ iaik.server.modules.xmlverify.SupplementException.class, "2230", MOAApplicationException.class },
{ iaik.server.modules.xmlverify.TransformationException.class, "2265", MOAApplicationException.class },
- { iaik.server.modules.xmlverify.TransformationParsingException.class, "2269", MOAApplicationException.class }
+ { iaik.server.modules.xmlverify.TransformationParsingException.class, "2269", MOAApplicationException.class },
};
/** The single instance of this class. */