diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2017-01-20 14:48:55 +0100 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2017-01-20 14:48:55 +0100 |
commit | b0d77d439a8df6b09648e19b1ec93f24eadfbe7b (patch) | |
tree | b05838605daf9e73ac437bdb778d771a4c450166 /moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java | |
parent | 172cae552dfecad074cac9834d22ec07f6cb7605 (diff) | |
download | moa-sig-b0d77d439a8df6b09648e19b1ec93f24eadfbe7b.tar.gz moa-sig-b0d77d439a8df6b09648e19b1ec93f24eadfbe7b.tar.bz2 moa-sig-b0d77d439a8df6b09648e19b1ec93f24eadfbe7b.zip |
small changes to support TSL-lib version RC2
Diffstat (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java')
-rw-r--r-- | moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java index 23fe487..0063c7f 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java @@ -29,6 +29,8 @@ import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.regex.Pattern; +import java.util.regex.PatternSyntaxException; import at.gv.egovernment.moa.sig.tsl.TslConstants; import at.gv.egovernment.moaspss.logging.Logger; @@ -55,7 +57,7 @@ public class TrustProfile { private List<String> countries = new ArrayList<String>(); private List<URI> allowedTspStatus = new ArrayList<URI>(); - private List<URI> allowedTspServiceTypes = new ArrayList<URI>(); + private List<Pattern> allowedTspServiceTypes = new ArrayList<Pattern>(); /** @@ -134,10 +136,10 @@ public class TrustProfile { String[] ccArray = allowedTspServiceTypes.split(","); for (String el : ccArray) { try { - this.allowedTspServiceTypes.add(new URI(el.trim())); + this.allowedTspServiceTypes.add(Pattern.compile(el.trim())); - } catch (URISyntaxException e) { - Logger.warn("TrustProfile: " + this.id + " contains a non-valid TSP Service-Type identifier (" + el + ")"); + } catch (PatternSyntaxException e) { + Logger.warn("TrustProfile: " + this.id + " contains a non-valid TSP Service-Type identifier Regex pattern(" + el + ")"); } @@ -147,8 +149,7 @@ public class TrustProfile { Logger.debug("Use default set of TSP Service-Type identifier"); this.allowedTspServiceTypes.addAll( Arrays.asList( - TslConstants.SERVICE_TYPE_SORT_TO_URI.get(TslConstants.SERVICE_TYPE_SHORT.CA_QC), - TslConstants.SERVICE_TYPE_SORT_TO_URI.get(TslConstants.SERVICE_TYPE_SHORT.TSA_QTST))); + Pattern.compile(TslConstants.DEFAULT_REGEX_PATTERN_ALLOW_ALL))); } @@ -204,7 +205,7 @@ public class TrustProfile { return allowedTspStatus; } - public List<URI> getAllowedTspServiceTypes() { + public List<Pattern> getAllowedTspServiceTypes() { return allowedTspServiceTypes; } |