cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: Only explicitly expand xop:Include elements if MTOM is enabled
Date Fri, 27 Jan 2017 16:05:41 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes ac2452e4a -> 2c7ceeebb


Only explicitly expand xop:Include elements if MTOM is enabled


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2c7ceeeb
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2c7ceeeb
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2c7ceeeb

Branch: refs/heads/3.1.x-fixes
Commit: 2c7ceeebb6cbf219b2a64a3fb688418eb7dad3c1
Parents: ac2452e
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Jan 27 15:30:56 2017 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Jan 27 16:05:36 2017 +0000

----------------------------------------------------------------------
 .../apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/2c7ceeeb/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
index df783b6..967917f 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
@@ -39,7 +39,7 @@ import javax.xml.transform.dom.DOMSource;
 
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
-
+import org.apache.cxf.attachment.AttachmentUtil;
 import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.SoapVersion;
@@ -241,13 +241,20 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
                 Certificate[] tlsCerts = tlsInfo.getPeerCertificates();
                 reqData.setTlsCerts(tlsCerts);
             }
-
+            
             /*
              * Get and check the Signature specific parameters first because
              * they may be used for encryption too.
              */
             doReceiverAction(actions, reqData);
             
+            // Only search for and expand (Signed) XOP Elements if MTOM is enabled (and not
+            // explicitly specified by the user)
+            String expandXOP = getString(WSHandlerConstants.EXPAND_XOP_INCLUDE_FOR_SIGNATURE,
msg);
+            if (expandXOP == null) {
+                reqData.setExpandXopIncludeForSignature(AttachmentUtil.isMtomEnabled(msg));
+            }
+            
             /*get chance to check msg context enableRevocation setting
              *when use policy based ws-security where the WSHandler configuration
              *isn't available


Mime
View raw message