You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by mu...@apache.org on 2007/03/22 15:32:02 UTC

svn commit: r521289 - /xml/security/trunk/src/org/apache/xml/security/transforms/implementations/

Author: mullan
Date: Thu Mar 22 07:32:00 2007
New Revision: 521289

URL: http://svn.apache.org/viewvc?view=rev&rev=521289
Log:
Fixed Bug 41927: Cannot canonicalize with XSLT transform. Thanks to
Lijun Liao for fix.

Modified:
    xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformBase64Decode.java
    xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14N.java
    xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NExclusive.java
    xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NExclusiveWithComments.java
    xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NWithComments.java
    xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformXSLT.java

Modified: xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformBase64Decode.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformBase64Decode.java?view=diff&rev=521289&r1=521288&r2=521289
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformBase64Decode.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformBase64Decode.java Thu Mar 22 07:32:00 2007
@@ -40,7 +40,6 @@
 import org.w3c.dom.Text;
 import org.xml.sax.SAXException;
 
-
 /**
  * Implements the <CODE>http://www.w3.org/2000/09/xmldsig#base64</CODE> decoding
  * transform.
@@ -92,11 +91,13 @@
     * @throws IOException
     * @throws TransformationException
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform _transformObject)
+   protected XMLSignatureInput enginePerformTransform
+	(XMLSignatureInput input, Transform _transformObject)
            throws IOException, CanonicalizationException,
                   TransformationException {
-   	return enginePerformTransform(input,null, null);
+   	return enginePerformTransform(input, null, _transformObject);
    }
+
     protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,
             OutputStream os, Transform _transformObject)
     throws IOException, CanonicalizationException,

Modified: xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14N.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14N.java?view=diff&rev=521289&r1=521288&r2=521289
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14N.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14N.java Thu Mar 22 07:32:00 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.xml.security.transforms.implementations;
 
-
-
 import java.io.OutputStream;
 
 import org.apache.xml.security.c14n.CanonicalizationException;
@@ -27,7 +25,6 @@
 import org.apache.xml.security.transforms.TransformSpi;
 import org.apache.xml.security.transforms.Transforms;
 
-
 /**
  * Implements the <CODE>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</CODE>
  * transform.
@@ -51,10 +48,12 @@
    /**
     *  @inheritDoc 
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform _transformObject)
+   protected XMLSignatureInput enginePerformTransform
+	(XMLSignatureInput input, Transform _transformObject)
            throws CanonicalizationException {
-   	    return enginePerformTransform(input,null, null);
+   	    return enginePerformTransform(input, null, _transformObject);
    }
+
     protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os, Transform _transformObject)
     throws CanonicalizationException {   
          Canonicalizer20010315OmitComments c14n = new Canonicalizer20010315OmitComments();

Modified: xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NExclusive.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NExclusive.java?view=diff&rev=521289&r1=521288&r2=521289
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NExclusive.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NExclusive.java Thu Mar 22 07:32:00 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.xml.security.transforms.implementations;
 
-
-
 import java.io.OutputStream;
 
 import org.apache.xml.security.c14n.CanonicalizationException;
@@ -31,7 +29,6 @@
 import org.apache.xml.security.utils.XMLUtils;
 import org.w3c.dom.Element;
 
-
 /**
  * Class TransformC14NExclusive
  *
@@ -44,7 +41,6 @@
    public static final String implementedTransformURI =
       Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS;
 
-
    /**
     * Method engineGetURI
     *
@@ -61,10 +57,12 @@
     * @return the transformed of the input
     * @throws CanonicalizationException
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform _transformObject)
+   protected XMLSignatureInput enginePerformTransform
+	(XMLSignatureInput input, Transform _transformObject)
            throws CanonicalizationException {
-   	    return enginePerformTransform(input,null, null);
+   	    return enginePerformTransform(input, null, _transformObject);
    }
+
     protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os, Transform _transformObject)
     throws CanonicalizationException {
       try {

Modified: xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NExclusiveWithComments.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NExclusiveWithComments.java?view=diff&rev=521289&r1=521288&r2=521289
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NExclusiveWithComments.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NExclusiveWithComments.java Thu Mar 22 07:32:00 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.xml.security.transforms.implementations;
 
-
-
 import java.io.OutputStream;
 
 import org.apache.xml.security.c14n.CanonicalizationException;
@@ -31,7 +29,6 @@
 import org.apache.xml.security.utils.XMLUtils;
 import org.w3c.dom.Element;
 
-
 /**
  * Implements the <CODE>http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments</CODE>
  * transform.
@@ -44,7 +41,6 @@
    public static final String implementedTransformURI =
       Transforms.TRANSFORM_C14N_EXCL_WITH_COMMENTS;
 
-
    /**
     * Method engineGetURI
     *@inheritDoc 
@@ -57,10 +53,12 @@
    /**
     * @inheritDoc 
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform _transformObject)
+   protected XMLSignatureInput enginePerformTransform
+	(XMLSignatureInput input, Transform _transformObject)
            throws CanonicalizationException {
-   	    return enginePerformTransform(input,null, null);
+   	    return enginePerformTransform(input, null, _transformObject);
    }
+
     protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os, Transform _transformObject)
     throws CanonicalizationException {
      try {

Modified: xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NWithComments.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NWithComments.java?view=diff&rev=521289&r1=521288&r2=521289
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NWithComments.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformC14NWithComments.java Thu Mar 22 07:32:00 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.xml.security.transforms.implementations;
 
-
-
 import java.io.OutputStream;
 
 import org.apache.xml.security.c14n.CanonicalizationException;
@@ -27,7 +25,6 @@
 import org.apache.xml.security.transforms.TransformSpi;
 import org.apache.xml.security.transforms.Transforms;
 
-
 /**
  * Implements the <CODE>http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments</CODE>
  * transform.
@@ -40,16 +37,18 @@
    public static final String implementedTransformURI =
       Transforms.TRANSFORM_C14N_WITH_COMMENTS;
 
-
    /** @inheritDoc */
    protected String engineGetURI() {
       return implementedTransformURI;
    }
+
    /** @inheritDoc */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform _transformObject)
-   throws CanonicalizationException {
-   	    return enginePerformTransform(input,null, null);
+   protected XMLSignatureInput enginePerformTransform
+	(XMLSignatureInput input, Transform _transformObject)
+   	throws CanonicalizationException {
+   	    return enginePerformTransform(input, null, _transformObject);
    }
+
    /** @inheritDoc */
    protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream os, Transform _transformObject)
            throws CanonicalizationException {

Modified: xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformXSLT.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformXSLT.java?view=diff&rev=521289&r1=521288&r2=521289
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformXSLT.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/transforms/implementations/TransformXSLT.java Thu Mar 22 07:32:00 2007
@@ -17,8 +17,6 @@
  */
 package org.apache.xml.security.transforms.implementations;
 
-
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -42,7 +40,6 @@
 import org.apache.xml.security.utils.XMLUtils;
 import org.w3c.dom.Element;
 
-
 /**
  * Class TransformXSLT
  *
@@ -61,7 +58,6 @@
    static final String defaultXSLTSpecNSprefix = "xslt";
    static final String XSLTSTYLESHEET          = "stylesheet";
 
-
    /**
     * Method engineGetURI
     *
@@ -79,11 +75,13 @@
     * @throws IOException
     * @throws TransformationException
     */
-   protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input, Transform _transformObject)
+   protected XMLSignatureInput enginePerformTransform
+	(XMLSignatureInput input, Transform _transformObject)
            throws IOException,
                   TransformationException {
-   	return enginePerformTransform(input,null, null);
+   	return enginePerformTransform(input, null, _transformObject);
    }
+
     protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input,OutputStream baos, Transform _transformObject)
     throws IOException,
            TransformationException {