Author: werner
Date: Fri Sep  9 12:33:07 2005
New Revision: 279854

URL: http://svn.apache.org/viewcvs?rev=279854&view=rev
Log:
can't depend on xml-security Base64 stuff...
making a copy (added a param for wrapping line during encoding), 
fixed another problem in encode
Detect X509Data in STR.

Modified:
    
webservices/wss4j/trunk/src/org/apache/ws/security/transform/STRTransform.java

Modified: 
webservices/wss4j/trunk/src/org/apache/ws/security/transform/STRTransform.java
URL: 
http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/transform/STRTransform.java?rev=279854&r1=279853&r2=279854&view=diff
==============================================================================
--- 
webservices/wss4j/trunk/src/org/apache/ws/security/transform/STRTransform.java 
(original)
+++ 
webservices/wss4j/trunk/src/org/apache/ws/security/transform/STRTransform.java 
Fri Sep  9 12:33:07 2005
@@ -31,8 +31,9 @@
 import org.apache.xml.security.exceptions.XMLSecurityException;
 import org.apache.xml.security.signature.XMLSignatureInput;
 import org.apache.xml.security.transforms.TransformSpi;
-import org.apache.xml.security.utils.Base64;
+import org.apache.ws.security.util.Base64;
 import org.apache.xml.security.utils.XMLUtils;
+// import org.apache.xml.security.utils.Base64;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
@@ -328,7 +329,7 @@
          * certificate, if that fails, lookup in keystore, wrap
          * in BST according to specification
          */
-        else if (secRef.containsX509IssuerSerial()) {
+        else if (secRef.containsX509Data() || 
secRef.containsX509IssuerSerial()) {
             if (doDebug) {
                 log.debug("STR: IssuerSerial");
             }
@@ -389,7 +390,7 @@
         WSSecurityUtil.setNamespace(elem, WSConstants.WSSE_NS, prefix);
         elem.setAttributeNS(WSConstants.XMLNS_NS, "xmlns", "");
         elem.setAttributeNS(null, "ValueType", X509Security.getType());
-        Text certText = doc.createTextNode(Base64.encode(data, 0));  // no 
line wrap
+        Text certText = doc.createTextNode(Base64.encode(data));  // no line 
wrap
         elem.appendChild(certText);
         return elem;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to