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:24 GMT
Repository: cxf
Updated Branches:
  refs/heads/master eccca31cc -> ca2c686ae


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/ca2c686a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ca2c686a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ca2c686a

Branch: refs/heads/master
Commit: ca2c686aee21e8144e84bcea26e459eb2d69d9da
Parents: eccca31
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:20 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/ca2c686a/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 524d35f..8931ae1 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