From 92709b7a3e7c18583e127d2160cfd96361ac035b Mon Sep 17 00:00:00 2001 From: kstranacher Date: Thu, 16 Feb 2012 19:03:20 +0000 Subject: =?UTF-8?q?*=20Update=20sourceID=20Parameter=20*=20Blacklist-?= =?UTF-8?q?=C3=9Cbergabe=20an=20iaik-moa=20*=20iaik-moa.jar=20zu=20reposit?= =?UTF-8?q?ory=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1250 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../server/config/ConfigurationPartsBuilder.java | 33 +++++++++++++++++----- .../spss/server/config/ConfigurationProvider.java | 3 +- .../spss/server/invoke/IaikExceptionMapper.java | 2 +- 3 files changed, 29 insertions(+), 9 deletions(-) (limited to 'spss/server/serverlib/src/main/java/at/gv') 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. */ -- cgit v1.2.3