cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [3/3] cxf git commit: Fixing merge
Date Wed, 23 Nov 2016 12:30:34 GMT
Fixing merge


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

Branch: refs/heads/3.0.x-fixes
Commit: f794e015ac2cc8b927b7b07d152dad04d5d20b13
Parents: 24bbc95
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Nov 23 12:30:24 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Nov 23 12:30:24 2016 +0000

----------------------------------------------------------------------
 .../policyhandlers/SymmetricBindingHandler.java | 37 ++++----------------
 1 file changed, 6 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f794e015/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
index 0237ab0..97e0b9c 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
@@ -928,8 +928,7 @@ public class SymmetricBindingHandler extends AbstractBindingBuilder {
         return id;
     }
     
-<<<<<<< HEAD
-    private String getEncryptedKey() {
+    private SecurityToken getEncryptedKey() {
         
         List<WSHandlerResult> results = CastUtils.cast((List<?>)message.getExchange().getInMessage()
             .get(WSHandlerConstants.RECV_RESULTS));
@@ -946,32 +945,14 @@ public class SymmetricBindingHandler extends AbstractBindingBuilder
{
                     Date created = new Date();
                     Date expires = new Date();
                     expires.setTime(created.getTime() + 300000);
-                    SecurityToken tempTok = new SecurityToken(encryptedKeyID, created, expires);
-                    tempTok.setSecret((byte[])wser.get(WSSecurityEngineResult.TAG_SECRET));
-                    tempTok.setSHA1(getSHA1((byte[])wser
+                    SecurityToken securityToken = new SecurityToken(encryptedKeyID, created,
expires);
+                    securityToken.setSecret((byte[])wser.get(WSSecurityEngineResult.TAG_SECRET));
+                    securityToken.setSHA1(getSHA1((byte[])wser
                                             .get(WSSecurityEngineResult.TAG_ENCRYPTED_EPHEMERAL_KEY)));
-                    tokenStore.add(tempTok);
                     
-                    return encryptedKeyID;
+                    return securityToken;
                 }
             }
-=======
-    private SecurityToken getEncryptedKey() {
-        WSSecurityEngineResult encryptedKeyResult = getEncryptedKeyResult();
-        if (encryptedKeyResult != null) {
-            // Store it in the cache
-            Date created = new Date();
-            Date expires = new Date();
-            expires.setTime(created.getTime() + WSS4JUtils.getSecurityTokenLifetime(message));
-            
-            String encryptedKeyID = (String)encryptedKeyResult.get(WSSecurityEngineResult.TAG_ID);
-            SecurityToken securityToken = new SecurityToken(encryptedKeyID, created, expires);
-            securityToken.setSecret((byte[])encryptedKeyResult.get(WSSecurityEngineResult.TAG_SECRET));
-            securityToken.setSHA1(getSHA1((byte[])encryptedKeyResult
-                                    .get(WSSecurityEngineResult.TAG_ENCRYPTED_EPHEMERAL_KEY)));
-            
-            return securityToken;
->>>>>>> 0769de2... CXF-7148 - Race Condition while handling symmetric
key in SymmetricBindingHandler
         }
         return null;
     }
@@ -993,15 +974,9 @@ public class SymmetricBindingHandler extends AbstractBindingBuilder {
                     }
                     Date created = new Date();
                     Date expires = new Date();
-<<<<<<< HEAD
                     expires.setTime(created.getTime() + 300000);
-                    SecurityToken tempTok = new SecurityToken(utID, created, expires);
-                    
-=======
-                    expires.setTime(created.getTime() + WSS4JUtils.getSecurityTokenLifetime(message));
                     SecurityToken securityToken = new SecurityToken(utID, created, expires);
-
->>>>>>> 0769de2... CXF-7148 - Race Condition while handling symmetric
key in SymmetricBindingHandler
+                    
                     byte[] secret = (byte[])wser.get(WSSecurityEngineResult.TAG_SECRET);
                     securityToken.setSecret(secret);
 


Mime
View raw message