cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/2] cxf git commit: Fix X509TokenValidator with latest changes in wss4j
Date Wed, 08 Jul 2015 20:40:45 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/58d5200b
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/58d5200b
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/58d5200b

Branch: refs/heads/master
Commit: 58d5200bdc0f666615e99f1c624c53299120518a
Parents: 81f0b46
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Jul 8 16:39:07 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Jul 8 16:39:07 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/58d5200b/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 f9f1ee7..6be11e8 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