cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1480292 - /cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Date Wed, 08 May 2013 14:32:17 GMT
Author: coheigea
Date: Wed May  8 14:32:17 2013
New Revision: 1480292

URL: http://svn.apache.org/r1480292
Log:
Get the last WSS4J Principal first when parsing the security context (+ skip the Decryption
case)

Modified:
    cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java

Modified: cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=1480292&r1=1480291&r2=1480292&view=diff
==============================================================================
--- cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ cxf/branches/wss4j2.0-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Wed May  8 14:32:17 2013
@@ -448,7 +448,13 @@ public class WSS4JInInterceptor extends 
         WSHandlerResult rResult = new WSHandlerResult(actor, wsResult);
         results.add(0, rResult);
 
-        for (WSSecurityEngineResult o : wsResult) {
+        for (int i = wsResult.size() - 1; i >= 0; i--) {
+            WSSecurityEngineResult o = wsResult.get(i);
+            Integer action = (Integer)o.get(WSSecurityEngineResult.TAG_ACTION);
+            if (action == WSConstants.ENCR) {
+                // Don't try to parse a Principal for the Decryption case
+                continue;
+            }
             final Principal p = (Principal)o.get(WSSecurityEngineResult.TAG_PRINCIPAL);
             final Subject subject = (Subject)o.get(WSSecurityEngineResult.TAG_SUBJECT);
             if (subject != null) {



Mime
View raw message