Author: coheigea
Date: Tue Jul 2 13:56:05 2019
New Revision: 1862427
URL: http://svn.apache.org/viewvc?rev=1862427&view=rev
Log:
Consolidating some code
Modified:
webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java
Modified:
webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java
URL:
http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java?rev=1862427&r1=1862426&r2=1862427&view=diff
==============================================================================
---
webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java
(original)
+++
webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/processor/SignatureProcessor.java
Tue Jul 2 13:56:05 2019
@@ -434,18 +434,7 @@ public class SignatureProcessor implemen
// Look for xop:Include Nodes
List<Element> includeElements =
XMLUtils.findElements(element.getFirstChild(), "Include",
WSConstants.XOP_NS);
- for (Element includeElement : includeElements) {
- String xopURI = includeElement.getAttributeNS(null,
"href");
- if (xopURI != null) {
- // Store the bytes in the attachment to calculate the
signature
- byte[] attachmentBytes =
WSSecurityUtil.getBytesFromAttachment(xopURI, data);
- String encodedBytes =
org.apache.xml.security.utils.XMLUtils.encodeToString(attachmentBytes);
-
- Node newCipherValueChild =
-
includeElement.getOwnerDocument().createTextNode(encodedBytes);
-
includeElement.getParentNode().replaceChild(newCipherValueChild,
includeElement);
- }
- }
+ WSSecurityUtil.inlineAttachments(includeElements,
data.getAttachmentCallbackHandler(), true);
}
}
}