cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1102249 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
Date Thu, 12 May 2011 11:42:21 GMT
Author: coheigea
Date: Thu May 12 11:42:20 2011
New Revision: 1102249

URL: http://svn.apache.org/viewvc?rev=1102249&view=rev
Log:
Encrypt the SOAP Body if the EncryptedParts policy is empty.

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java?rev=1102249&r1=1102248&r2=1102249&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
Thu May 12 11:42:20 2011
@@ -49,7 +49,6 @@ public class EncryptedPartsBuilder imple
 
         SignedEncryptedParts signedEncryptedParts = new SignedEncryptedParts(false, consts);
 
-
         Node nd = element.getFirstChild();
         while (nd != null) {
             if (nd instanceof Element) {
@@ -58,6 +57,14 @@ public class EncryptedPartsBuilder imple
             nd = nd.getNextSibling();
         }
         
+        //
+        // If EncryptedParts is empty then default to encrypting the SOAP Body
+        //
+        if (!signedEncryptedParts.isBody() && !signedEncryptedParts.isAttachments()
+            && signedEncryptedParts.getHeaders().isEmpty()) {
+            signedEncryptedParts.setBody(true);
+        }
+        
         return signedEncryptedParts;
     }
 



Mime
View raw message