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/06/25 12:04:39 UTC

svn commit: r1687465 - /webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncryptedKey.java

Author: coheigea
Date: Thu Jun 25 10:04:39 2015
New Revision: 1687465

URL: http://svn.apache.org/r1687465
Log:
Fix for last commit

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

Modified: webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncryptedKey.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncryptedKey.java?rev=1687465&r1=1687464&r2=1687465&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncryptedKey.java (original)
+++ webservices/wss4j/branches/2_0_x-fixes/ws-security-dom/src/main/java/org/apache/wss4j/dom/message/WSSecEncryptedKey.java Thu Jun 25 10:04:39 2015
@@ -340,7 +340,7 @@ public class WSSecEncryptedKey extends W
         encryptedKeyElement.setAttributeNS(null, "Id", encKeyId);
 
         if (customEKKeyInfoElement != null) {
-            encryptedKeyElement.appendChild(customEKKeyInfoElement);
+            encryptedKeyElement.appendChild(document.adoptNode(customEKKeyInfoElement));
         } else {
             SecurityTokenReference secToken = new SecurityTokenReference(document);
     
@@ -474,7 +474,7 @@ public class WSSecEncryptedKey extends W
         encryptedKeyElement.setAttributeNS(null, "Id", encKeyId);
 
         if (customEKKeyInfoElement != null) {
-            encryptedKeyElement.appendChild(customEKKeyInfoElement);
+            encryptedKeyElement.appendChild(document.adoptNode(customEKKeyInfoElement));
         } else if (keyIdentifierType == WSConstants.CUSTOM_SYMM_SIGNING
             || keyIdentifierType == WSConstants.CUSTOM_SYMM_SIGNING_DIRECT
             || keyIdentifierType == WSConstants.CUSTOM_KEY_IDENTIFIER) {