cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: Use the QName of a service as part of the cache key
Date Mon, 03 Mar 2014 14:13:08 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.6.x-fixes 258cd0914 -> e9fd4dae5


Use the QName of a service as part of the cache key

Conflicts:
	rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java

Conflicts:
	rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e9fd4dae
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e9fd4dae
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e9fd4dae

Branch: refs/heads/2.6.x-fixes
Commit: e9fd4dae5d6feb53fec92fee34142192320d6469
Parents: 258cd09
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Mar 3 12:35:24 2014 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Mar 3 14:12:56 2014 +0000

----------------------------------------------------------------------
 .../cxf/ws/security/policy/interceptors/NegotiationUtils.java  | 6 +-----
 .../main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java | 6 +-----
 2 files changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/e9fd4dae/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java
index 5b21159..8138a57 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/NegotiationUtils.java
@@ -19,7 +19,6 @@
 
 package org.apache.cxf.ws.security.policy.interceptors;
 
-import java.math.BigInteger;
 import java.util.Collection;
 import java.util.List;
 
@@ -66,7 +65,6 @@ import org.apache.ws.security.conversation.ConversationException;
 import org.apache.ws.security.handler.WSHandlerConstants;
 import org.apache.ws.security.handler.WSHandlerResult;
 import org.apache.ws.security.message.token.SecurityContextToken;
-import org.apache.xml.security.utils.Base64;
 
 /**
  * This is a collection of utility methods for use in negotiation exchanges such as WS-SecureConversation

@@ -113,9 +111,7 @@ public final class NegotiationUtils {
                 TokenStoreFactory tokenStoreFactory = TokenStoreFactory.newInstance();
                 String cacheKey = SecurityConstants.TOKEN_STORE_CACHE_INSTANCE;
                 if (info.getName() != null) {
-                    int hashCode = info.getName().toString().hashCode();
-                    cacheKey +=
-                        "-" + Base64.encode(BigInteger.valueOf((long)hashCode));
+                    cacheKey += "-" + info.getName().toString();
                 }
                 tokenStore = tokenStoreFactory.newTokenStore(cacheKey, message);
                 info.setProperty(SecurityConstants.TOKEN_STORE_CACHE_INSTANCE, tokenStore);

http://git-wip-us.apache.org/repos/asf/cxf/blob/e9fd4dae/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
index a0df930..6d7d2ea 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
@@ -18,7 +18,6 @@
  */
 package org.apache.cxf.ws.security.wss4j;
 
-import java.math.BigInteger;
 import javax.xml.namespace.QName;
 
 import org.apache.cxf.binding.soap.SoapMessage;
@@ -29,7 +28,6 @@ import org.apache.cxf.ws.security.cache.ReplayCacheFactory;
 import org.apache.ws.security.WSConstants;
 import org.apache.ws.security.WSSecurityException;
 import org.apache.ws.security.cache.ReplayCache;
-import org.apache.xml.security.utils.Base64;
 
 /**
  * Some common functionality that can be shared between the WSS4JInInterceptor and the
@@ -96,9 +94,7 @@ public final class WSS4JUtils {
                     ReplayCacheFactory replayCacheFactory = ReplayCacheFactory.newInstance();
                     String cacheKey = instanceKey;
                     if (info.getName() != null) {
-                        int hashCode = info.getName().toString().hashCode();
-                        cacheKey +=
-                            "-" + Base64.encode(BigInteger.valueOf((long)hashCode));
+                        cacheKey += "-" + info.getName().toString();
                     }
                     replayCache = replayCacheFactory.newReplayCache(cacheKey, message);
                     info.setProperty(instanceKey, replayCache);


Mime
View raw message