cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [9/9] cxf git commit: Fix X509TokenValidator with latest changes in wss4j
Date Thu, 09 Jul 2015 16:20:42 GMT
Fix X509TokenValidator with latest changes in wss4j


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

Branch: refs/heads/3.0.x-fixes
Commit: 2d6414108cac3ec6208e9f961d24d0d1d49289c7
Parents: b6907af
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Jul 8 16:39:07 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Jul 9 12:20:27 2015 -0400

----------------------------------------------------------------------
 .../org/apache/cxf/sts/token/validator/X509TokenValidator.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/2d641410/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
index 4c68c44..1cf2ee7 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/X509TokenValidator.java
@@ -28,7 +28,9 @@ import javax.security.auth.callback.CallbackHandler;
 
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
+import org.w3c.dom.Node;
 import org.w3c.dom.Text;
+
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.sts.STSPropertiesMBean;
@@ -146,7 +148,9 @@ public class X509TokenValidator implements TokenValidator {
             binarySecurity.setEncodingType(encodingType);
             binarySecurity.setValueType(binarySecurityType.getValueType());
             String data = binarySecurityType.getValue();
-            ((Text)binarySecurity.getElement().getFirstChild()).setData(data);
+            
+            Node textNode = doc.createTextNode(data);
+            binarySecurity.getElement().appendChild(textNode);
         } else if (validateTarget.isDOMElement()) {
             try {
                 Document doc = DOMUtils.createDocument();


Mime
View raw message