You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2015/03/04 13:00:08 UTC

svn commit: r1663951 - /webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/ReferenceListProcessor.java

Author: coheigea
Date: Wed Mar  4 12:00:08 2015
New Revision: 1663951

URL: http://svn.apache.org/r1663951
Log:
Backporting RLP change

Modified:
    webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/ReferenceListProcessor.java

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/ReferenceListProcessor.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/ReferenceListProcessor.java?rev=1663951&r1=1663950&r2=1663951&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/ReferenceListProcessor.java (original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/ReferenceListProcessor.java Wed Mar  4 12:00:08 2015
@@ -101,10 +101,6 @@ public class ReferenceListProcessor impl
         WSDocInfo wsDocInfo
     ) throws WSSecurityException {
         List<WSDataRef> dataRefs = new ArrayList<WSDataRef>();
-        //find out if there's an EncryptedKey in the doc (AsymmetricBinding)
-        Element wsseHeaderElement = wsDocInfo.getSecurityHeader();
-        boolean asymBinding = WSSecurityUtil.getDirectChildElement(
-            wsseHeaderElement, WSConstants.ENC_KEY_LN, WSConstants.ENC_NS) != null;
         for (Node node = elem.getFirstChild(); 
             node != null; 
             node = node.getNextSibling()
@@ -120,7 +116,7 @@ public class ReferenceListProcessor impl
                 if (wsDocInfo.getResultByTag(WSConstants.ENCR, dataRefURI) == null) {
                     WSDataRef dataRef = 
                         decryptDataRefEmbedded(
-                            elem.getOwnerDocument(), dataRefURI, data, wsDocInfo, asymBinding);
+                            elem.getOwnerDocument(), dataRefURI, data, wsDocInfo);
                     dataRefs.add(dataRef);
                 }
             }
@@ -137,8 +133,7 @@ public class ReferenceListProcessor impl
         Document doc, 
         String dataRefURI, 
         RequestData data,
-        WSDocInfo wsDocInfo,
-        boolean asymBinding
+        WSDocInfo wsDocInfo
     ) throws WSSecurityException {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Found data reference: " + dataRefURI);
@@ -148,7 +143,7 @@ public class ReferenceListProcessor impl
         //
         Element encryptedDataElement = findEncryptedDataElement(doc, wsDocInfo, dataRefURI);
         
-        if (encryptedDataElement != null && asymBinding && data.isRequireSignedEncryptedDataElements()) {
+        if (encryptedDataElement != null && data.isRequireSignedEncryptedDataElements()) {
             List<WSSecurityEngineResult> signedResults = 
                 wsDocInfo.getResultsByTag(WSConstants.SIGN);
             WSSecurityUtil.verifySignedElement(encryptedDataElement, signedResults);