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:15:08 UTC

svn commit: r1127147 - in /cxf/branches/2.3.x-fixes: ./ rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SignedEncryptedElements.java

Author: dkulp
Date: Tue May 24 17:15:08 2011
New Revision: 1127147

URL: http://svn.apache.org/viewvc?rev=1127147&view=rev
Log:
Merged revisions 1101079 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1101079 | coheigea | 2011-05-09 12:00:46 -0400 (Mon, 09 May 2011) | 1 line
  
  Default to signing the SOAP Body for an empty SignedParts policy assertion.
........

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/SignedPartsBuilder.java
    cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SignedEncryptedElements.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/SignedPartsBuilder.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/SignedPartsBuilder.java?rev=1127147&r1=1127146&r2=1127147&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java (original)
+++ cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SignedPartsBuilder.java Tue May 24 17:15:08 2011
@@ -61,6 +61,14 @@ public class SignedPartsBuilder implemen
             nd = nd.getNextSibling();
         }
         
+        //
+        // If SignedParts is empty then default to signing the SOAP Body
+        //
+        if (!signedEncryptedParts.isBody() && !signedEncryptedParts.isAttachments()
+            && signedEncryptedParts.getHeaders().isEmpty()) {
+            signedEncryptedParts.setBody(true);
+        }
+        
         return signedEncryptedParts;
     }
 

Modified: cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SignedEncryptedElements.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/model/SignedEncryptedElements.java?rev=1127147&r1=1127146&r2=1127147&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SignedEncryptedElements.java (original)
+++ cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SignedEncryptedElements.java Tue May 24 17:15:08 2011
@@ -43,11 +43,11 @@ public class SignedEncryptedElements ext
     /**
      * Just a flag to identify whether this holds sign element info or encr elements info
      */
-    private boolean signedElemets;
+    private boolean signedElements;
 
     public SignedEncryptedElements(boolean signedElements, SPConstants version) {
         super(version);
-        this.signedElemets = signedElements;
+        this.signedElements = signedElements;
     }
 
     /**
@@ -76,10 +76,10 @@ public class SignedEncryptedElements ext
     }
 
     /**
-     * @return Returns the signedElemets.
+     * @return Returns the signedElements.
      */
     public boolean isSignedElemets() {
-        return signedElemets;
+        return signedElements;
     }
 
     public Map<String, String> getDeclaredNamespaces() {
@@ -127,13 +127,13 @@ public class SignedEncryptedElements ext
     }
 
     public QName getRealName() {
-        if (signedElemets) {
+        if (signedElements) {
             return constants.getSignedElements();
         }
         return constants.getEncryptedElements();
     }
     public QName getName() {
-        if (signedElemets) {
+        if (signedElements) {
             return SP12Constants.INSTANCE.getSignedElements();
         }
         return SP12Constants.INSTANCE.getEncryptedElements();