diff options
author | Christina Fu <cfu@redhat.com> | 2015-07-28 11:47:27 -0700 |
---|---|---|
committer | Christina Fu <cfu@redhat.com> | 2015-07-28 17:25:00 -0700 |
commit | b68fc753775cf49dcd3bafe046c71dda08ca6b9a (patch) | |
tree | a69e520dcb2f13f260da9fba36f5b27d3da88ee0 /base/tps | |
parent | e50a3d55017da97abb5296218422b4144c8ca990 (diff) | |
download | pki-b68fc753775cf49dcd3bafe046c71dda08ca6b9a.tar.gz pki-b68fc753775cf49dcd3bafe046c71dda08ca6b9a.tar.xz pki-b68fc753775cf49dcd3bafe046c71dda08ca6b9a.zip |
Ticket 1307 issue: FilterMappingResolver always returns target
Diffstat (limited to 'base/tps')
-rw-r--r-- | base/tps/src/org/dogtagpki/server/tps/channel/SecureChannel.java | 2 | ||||
-rw-r--r-- | base/tps/src/org/dogtagpki/server/tps/mapping/FilterMappingResolver.java | 17 |
2 files changed, 12 insertions, 7 deletions
diff --git a/base/tps/src/org/dogtagpki/server/tps/channel/SecureChannel.java b/base/tps/src/org/dogtagpki/server/tps/channel/SecureChannel.java index 95cf26c2f..598e99a64 100644 --- a/base/tps/src/org/dogtagpki/server/tps/channel/SecureChannel.java +++ b/base/tps/src/org/dogtagpki/server/tps/channel/SecureChannel.java @@ -393,7 +393,7 @@ public class SecureChannel { if (!response.checkResult()) { throw new TPSException( - "SecureChannel.eternalAuthenticate SCP01. Failed to external authenticate to token.", + "SecureChannel.externalAuthenticate SCP01. Failed to external authenticate to token.", TPSStatus.STATUS_ERROR_SECURE_CHANNEL); } diff --git a/base/tps/src/org/dogtagpki/server/tps/mapping/FilterMappingResolver.java b/base/tps/src/org/dogtagpki/server/tps/mapping/FilterMappingResolver.java index 38ea29c48..45cd20378 100644 --- a/base/tps/src/org/dogtagpki/server/tps/mapping/FilterMappingResolver.java +++ b/base/tps/src/org/dogtagpki/server/tps/mapping/FilterMappingResolver.java @@ -42,6 +42,7 @@ public class FilterMappingResolver extends BaseMappingResolver { String extKeySet = null; String targetMappedName = null; + String selectedMappedName = null; CMS.debug(method + " starts"); @@ -52,6 +53,7 @@ public class FilterMappingResolver extends BaseMappingResolver { CMS.debug(method + " param minor_version =" + minor_version); cuid = mappingParams.getString(FilterMappingParams.FILTER_PARAM_CUID); + CMS.debug(method + " param cuid =" + cuid); // msn = (String) mappingParams.get(FilterMappingParams.FILTER_PARAM_MSN); // they don't necessarily have extension @@ -225,7 +227,8 @@ public class FilterMappingResolver extends BaseMappingResolver { continue; } - if (cuid.compareTo(tokenCUIDStart) < 0) { + if (cuid.compareToIgnoreCase(tokenCUIDStart) < 0) { + CMS.debug(method + " cuid < tokenCUIDStart ... out of range"); continue; } @@ -255,7 +258,8 @@ public class FilterMappingResolver extends BaseMappingResolver { continue; } - if (cuid.compareTo(tokenCUIDEnd) > 0) { + if (cuid.compareToIgnoreCase(tokenCUIDEnd) > 0) { + CMS.debug(method + " cuid > tokenCUIDEnd ... out of range"); continue; } @@ -309,17 +313,18 @@ public class FilterMappingResolver extends BaseMappingResolver { } //if we make it this far, we have a mapped name - CMS.debug(method + " Selected Token type: " + targetMappedName); + selectedMappedName = targetMappedName; + CMS.debug(method + " Selected mapped name: " + selectedMappedName); break; } - if (targetMappedName == null) { - CMS.debug(method + " ends, found: " + targetMappedName); + if (selectedMappedName == null) { + CMS.debug(method + " ends, found: " + selectedMappedName); throw new TPSException(method + " Can't map to target name!", TPSStatus.STATUS_ERROR_MAPPING_RESOLVER_FAILED); } - return targetMappedName; + return selectedMappedName; } |