cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1480295 - /cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Date Wed, 08 May 2013 14:35:06 GMT
Author: coheigea
Date: Wed May  8 14:35:04 2013
New Revision: 1480295

URL: http://svn.apache.org/r1480295
Log:
Merged revisions 1480288 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1480288 | coheigea | 2013-05-08 16:26:26 +0200 (Wed, 08 May 2013) | 2 lines

  Get the last WSS4J Principal first when parsing the security context (+ skip the Decryption
case)

........

Modified:
    cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java

Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=1480295&r1=1480294&r2=1480295&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Wed May  8 14:35:04 2013
@@ -468,7 +468,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