You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2014/12/01 17:30:29 UTC

[1/2] cxf git commit: Recording .gitmergeinfo Changes

Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes ee8dc35aa -> 2449d3988


Recording .gitmergeinfo Changes


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

Branch: refs/heads/2.7.x-fixes
Commit: ab8286da301fe06b08a107cfb6d2aaac8fc75c1c
Parents: ee8dc35
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Mon Dec 1 16:19:02 2014 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Mon Dec 1 16:19:02 2014 +0000

----------------------------------------------------------------------
 .gitmergeinfo | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ab8286da/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 16d02ee..8a9fbab 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -85,6 +85,7 @@ B 0ca688ff5f52ceec7ac0971b1b73856523d2e389
 B 0cab9af902645eb9b72b3225c8271afa6002684f
 B 0ccdc3930f8f0dcee14140467be83d89c625dc46
 B 0cffef8fc445a8a367315521b03620a14bb8c60a
+B 0d19ce6ae178b3baa850483b4243f5bc6f4886b8
 B 0d2ea5d32f4504d9697364c883ea975f962108e7
 B 0da3215d1530c3100b33f3eb4b05637845374bac
 B 0dd17b9c51c92a943f27983033bbc05e7e8614eb
@@ -716,6 +717,7 @@ B 6fbbe40e41cf96318c9101f7fb597d0a508ce2f6
 B 6fc4cdf9d0a55b0d9ee87f27e20f67333977e828
 B 6fc8faefb596836e6ae698a87c675d400c3ef137
 B 6ffe710140ed4319e0ffb04fedf880b4f890f701
+B 700bc80368d8cc466d3a7748b1ebc64330947dcc
 B 7012de652898cd3a7ac9b2858bc6265a6e1054e0
 B 703b93cc965672f920088deeff8bde9c90b05480
 B 707c179ecaef3145d0ceb13b6368bfb6b3f704ae


[2/2] cxf git commit: Fix for potential ClassCastException

Posted by co...@apache.org.
Fix for potential ClassCastException


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

Branch: refs/heads/2.7.x-fixes
Commit: 2449d398832234a56fbaf923ff9066b1788794ce
Parents: ab8286d
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Mon Dec 1 16:30:15 2014 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Mon Dec 1 16:30:15 2014 +0000

----------------------------------------------------------------------
 .../ws/security/wss4j/WSS4JInInterceptor.java   | 36 +++++++++++---------
 1 file changed, 19 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/2449d398/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
index e1c5b52..c8318f1 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
@@ -680,26 +680,28 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
         
         public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
             for (int i = 0; i < callbacks.length; i++) {
-                WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
-                
-                String id = pc.getIdentifier();
-                
-                if (SecurityTokenReference.ENC_KEY_SHA1_URI.equals(pc.getType())
-                    || WSConstants.WSS_KRB_KI_VALUE_TYPE.equals(pc.getType())) {
-                    for (String tokenId : store.getTokenIdentifiers()) {
-                        SecurityToken token = store.getToken(tokenId);
-                        if (token != null && id.equals(token.getSHA1())) {
-                            pc.setKey(token.getSecret());
+                if (callbacks[i] instanceof WSPasswordCallback) {
+                    WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+                    
+                    String id = pc.getIdentifier();
+                    
+                    if (SecurityTokenReference.ENC_KEY_SHA1_URI.equals(pc.getType())
+                        || WSConstants.WSS_KRB_KI_VALUE_TYPE.equals(pc.getType())) {
+                        for (String tokenId : store.getTokenIdentifiers()) {
+                            SecurityToken token = store.getToken(tokenId);
+                            if (token != null && id.equals(token.getSHA1())) {
+                                pc.setKey(token.getSecret());
+                                return;
+                            }
+                        }
+                    } else { 
+                        SecurityToken tok = store.getToken(id);
+                        if (tok != null) {
+                            pc.setKey(tok.getSecret());
+                            pc.setCustomToken(tok.getToken());
                             return;
                         }
                     }
-                } else { 
-                    SecurityToken tok = store.getToken(id);
-                    if (tok != null) {
-                        pc.setKey(tok.getSecret());
-                        pc.setCustomToken(tok.getToken());
-                        return;
-                    }
                 }
             }
             if (internal != null) {