cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1564723 - in /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers: AsymmetricBindingHandler.java StaxAsymmetricBindingHandler.java SymmetricBindingHandler.java
Date Wed, 05 Feb 2014 12:01:28 GMT
Author: coheigea
Date: Wed Feb  5 12:01:28 2014
New Revision: 1564723

URL: http://svn.apache.org/r1564723
Log:
Fixing some EncryptBeforeSigning tests

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java?rev=1564723&r1=1564722&r2=1564723&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
Wed Feb  5 12:01:28 2014
@@ -253,8 +253,11 @@ public class AsymmetricBindingHandler ex
     
     private void doEncryptBeforeSign() {
         AbstractTokenWrapper wrapper = getEncryptBeforeSignWrapper();
-        AbstractToken encryptionToken = wrapper.getToken();
-        assertToken(encryptionToken);
+        AbstractToken encryptionToken = null;
+        if (wrapper != null) {
+            encryptionToken = wrapper.getToken();
+            assertToken(encryptionToken);
+        }
         
         AbstractTokenWrapper initiatorWrapper = abinding.getInitiatorSignatureToken();
         if (initiatorWrapper == null) {

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java?rev=1564723&r1=1564722&r2=1564723&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxAsymmetricBindingHandler.java
Wed Feb  5 12:01:28 2014
@@ -244,8 +244,10 @@ public class StaxAsymmetricBindingHandle
                 }
             }
             assertTokenWrapper(wrapper);
-            encryptionToken = wrapper.getToken();
-            assertToken(encryptionToken);
+            if (wrapper != null) {
+                encryptionToken = wrapper.getToken();
+                assertToken(encryptionToken);
+            }
             
             AbstractTokenWrapper initiatorWrapper = abinding.getInitiatorSignatureToken();
             if (initiatorWrapper == null) {

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java?rev=1564723&r1=1564722&r2=1564723&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/SymmetricBindingHandler.java
Wed Feb  5 12:01:28 2014
@@ -143,11 +143,7 @@ public class SymmetricBindingHandler ext
             List<WSEncryptionPart> encrParts = getEncryptedParts();
             List<WSEncryptionPart> sigParts = getSignedParts();
             
-            //if (encryptionToken == null && encrParts.size() > 0) {
-                //REVISIT - nothing to encrypt?
-            //}
-            
-            if (encryptionToken != null && encrParts.size() > 0) {
+            if (encryptionToken != null) {
                 //The encryption token can be an IssuedToken or a 
                 //SecureConversationToken
                 String tokenId = null;



Mime
View raw message