You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/05/24 19:18:28 UTC
svn commit: r1127151 - in /cxf/branches/2.3.x-fixes: ./
rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
Author: dkulp
Date: Tue May 24 17:18:28 2011
New Revision: 1127151
URL: http://svn.apache.org/viewvc?rev=1127151&view=rev
Log:
Merged revisions 1102249 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1102249 | coheigea | 2011-05-12 07:42:20 -0400 (Thu, 12 May 2011) | 1 line
Encrypt the SOAP Body if the EncryptedParts policy is empty.
........
Modified:
cxf/branches/2.3.x-fixes/ (props changed)
cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java?rev=1127151&r1=1127150&r2=1127151&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java (original)
+++ cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/EncryptedPartsBuilder.java Tue May 24 17:18:28 2011
@@ -51,7 +51,6 @@ public class EncryptedPartsBuilder imple
SignedEncryptedParts signedEncryptedParts = new SignedEncryptedParts(false, consts);
-
Node nd = element.getFirstChild();
while (nd != null) {
if (nd instanceof Element) {
@@ -60,6 +59,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;
}