You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by gi...@apache.org on 2013/03/23 13:38:14 UTC
svn commit: r1460135 - in /santuario/xml-security-java/trunk/src:
main/java/org/apache/xml/security/c14n/
main/java/org/apache/xml/security/c14n/implementations/
test/java/org/apache/xml/security/test/dom/c14n/implementations/
Author: giger
Date: Sat Mar 23 12:38:13 2013
New Revision: 1460135
URL: http://svn.apache.org/r1460135
Log:
new C14N api method to allow to enforce default namespace propagation to the c14n-ized root element.
This allows us to do the STRTransform in WSS4j without string manipulation after canonicalization.
Modified:
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/Canonicalizer.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/CanonicalizerSpi.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315Excl.java
santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerPhysical.java
santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Canonicalizer20010315ExclusiveTest.java
santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/c14n/implementations/MockCanonicalizationMethod.java
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/Canonicalizer.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/Canonicalizer.java?rev=1460135&r1=1460134&r2=1460135&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/Canonicalizer.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/Canonicalizer.java Sat Mar 23 12:38:13 2013
@@ -308,6 +308,19 @@ public class Canonicalizer {
}
/**
+ * Canonicalizes the subtree rooted by <CODE>node</CODE>.
+ *
+ * @param node
+ * @param inclusiveNamespaces
+ * @return the result of the c14n.
+ * @throws CanonicalizationException
+ */
+ public byte[] canonicalizeSubtree(Node node, String inclusiveNamespaces, boolean propagateDefaultNamespace)
+ throws CanonicalizationException {
+ return canonicalizerSpi.engineCanonicalizeSubTree(node, inclusiveNamespaces, propagateDefaultNamespace);
+ }
+
+ /**
* Canonicalizes an XPath node set. The <CODE>xpathNodeSet</CODE> is treated
* as a list of XPath nodes, not as a list of subtrees.
*
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/CanonicalizerSpi.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/CanonicalizerSpi.java?rev=1460135&r1=1460134&r2=1460135&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/CanonicalizerSpi.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/CanonicalizerSpi.java Sat Mar 23 12:38:13 2013
@@ -156,6 +156,19 @@ public abstract class CanonicalizerSpi {
throws CanonicalizationException;
/**
+ * C14n a node tree.
+ *
+ * @param rootNode
+ * @param inclusiveNamespaces
+ * @param propagateDefaultNamespace If true the default namespace will be propagated to the c14n-ized root element
+ * @return the c14n bytes
+ * @throws CanonicalizationException
+ */
+ public abstract byte[] engineCanonicalizeSubTree(
+ Node rootNode, String inclusiveNamespaces, boolean propagateDefaultNamespace)
+ throws CanonicalizationException;
+
+ /**
* Sets the writer where the canonicalization ends. ByteArrayOutputStream if
* none is set.
* @param os
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java?rev=1460135&r1=1460134&r2=1460135&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer11.java Sat Mar 23 12:38:13 2013
@@ -220,7 +220,21 @@ public abstract class Canonicalizer11 ex
) throws CanonicalizationException {
throw new CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation");
}
-
+
+ /**
+ * Always throws a CanonicalizationException because this is inclusive c14n.
+ *
+ * @param rootNode
+ * @param inclusiveNamespaces
+ * @return none it always fails
+ * @throws CanonicalizationException
+ */
+ public byte[] engineCanonicalizeSubTree(
+ Node rootNode, String inclusiveNamespaces, boolean propagateDefaultNamespace)
+ throws CanonicalizationException {
+ throw new CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation");
+ }
+
/**
* Returns the Attr[]s to be output for the given element.
* <br>
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315.java?rev=1460135&r1=1460134&r2=1460135&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315.java Sat Mar 23 12:38:13 2013
@@ -179,6 +179,22 @@ public abstract class Canonicalizer20010
}
/**
+ * Always throws a CanonicalizationException because this is inclusive c14n.
+ *
+ * @param rootNode
+ * @param inclusiveNamespaces
+ * @return none it always fails
+ * @throws CanonicalizationException
+ */
+ public byte[] engineCanonicalizeSubTree(
+ Node rootNode, String inclusiveNamespaces, boolean propagateDefaultNamespace)
+ throws CanonicalizationException {
+
+ /** $todo$ well, should we throw UnsupportedOperationException ? */
+ throw new CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation");
+ }
+
+ /**
* Returns the Attr[]s to be output for the given element.
* <br>
* The code of this method is a copy of {@link #handleAttributes(Element,
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315Excl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315Excl.java?rev=1460135&r1=1460134&r2=1460135&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315Excl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/Canonicalizer20010315Excl.java Sat Mar 23 12:38:13 2013
@@ -64,6 +64,7 @@ public abstract class Canonicalizer20010
* the inclusive namespaces.
*/
private SortedSet<String> inclusiveNSSet;
+ private boolean propagateDefaultNamespace = false;
private final SortedSet<Attr> result = new TreeSet<Attr>(COMPARE);
@@ -103,6 +104,22 @@ public abstract class Canonicalizer20010
}
/**
+ * Method engineCanonicalizeSubTree
+ * @inheritDoc
+ * @param rootNode
+ * @param inclusiveNamespaces
+ * @param propagateDefaultNamespace If true the default namespace will be propagated to the c14n-ized root element
+ *
+ * @throws CanonicalizationException
+ */
+ public byte[] engineCanonicalizeSubTree(
+ Node rootNode, String inclusiveNamespaces, boolean propagateDefaultNamespace
+ ) throws CanonicalizationException {
+ this.propagateDefaultNamespace = propagateDefaultNamespace;
+ return engineCanonicalizeSubTree(rootNode, inclusiveNamespaces, null);
+ }
+
+ /**
* Method engineCanonicalizeSubTree
* @param rootNode
* @param inclusiveNamespaces
@@ -189,6 +206,12 @@ public abstract class Canonicalizer20010
}
}
}
+ if (propagateDefaultNamespace && ns.getLevel() == 1 &&
+ inclusiveNSSet.contains(XMLNS) &&
+ ns.getMappingWithoutRendered(XMLNS) == null) {
+ ns.removeMapping(XMLNS);
+ ns.addMapping(XMLNS, "", nullNode);
+ }
String prefix = null;
if (element.getNamespaceURI() != null
&& !(element.getPrefix() == null || element.getPrefix().length() == 0)) {
Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerPhysical.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerPhysical.java?rev=1460135&r1=1460134&r2=1460135&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerPhysical.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/c14n/implementations/CanonicalizerPhysical.java Sat Mar 23 12:38:13 2013
@@ -90,6 +90,22 @@ public class CanonicalizerPhysical exten
}
/**
+ * Always throws a CanonicalizationException.
+ *
+ * @param rootNode
+ * @param inclusiveNamespaces
+ * @return none it always fails
+ * @throws CanonicalizationException
+ */
+ public byte[] engineCanonicalizeSubTree(
+ Node rootNode, String inclusiveNamespaces, boolean propagateDefaultNamespace)
+ throws CanonicalizationException {
+
+ /** $todo$ well, should we throw UnsupportedOperationException ? */
+ throw new CanonicalizationException("c14n.Canonicalizer.UnsupportedOperation");
+ }
+
+ /**
* Returns the Attr[]s to be output for the given element.
* <br>
* The code of this method is a copy of {@link #handleAttributes(Element,
Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Canonicalizer20010315ExclusiveTest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Canonicalizer20010315ExclusiveTest.java?rev=1460135&r1=1460134&r2=1460135&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Canonicalizer20010315ExclusiveTest.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/c14n/implementations/Canonicalizer20010315ExclusiveTest.java Sat Mar 23 12:38:13 2013
@@ -470,7 +470,7 @@ public class Canonicalizer20010315Exclus
+ " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">"
+ "<env:Body wsu:Id=\"body\">"
+ "<ns0:Ping xsi:type=\"ns0:ping\">"
- + "<ns0:text xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "<ns0:text xmlns=\"\" xsi:type=\"xsd:string\">hello</ns0:text>"
+ "</ns0:Ping>"
+ "</env:Body>"
+ "</env:Envelope>";
@@ -483,7 +483,7 @@ public class Canonicalizer20010315Exclus
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ " wsu:Id=\"body\">"
+ "<ns0:Ping xmlns:ns0=\"http://xmlsoap.org/Ping\" xsi:type=\"ns0:ping\">"
- + "<ns0:text xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "<ns0:text xmlns=\"\" xsi:type=\"xsd:string\">hello</ns0:text>"
+ "</ns0:Ping>"
+ "</env:Body>";
@@ -616,6 +616,180 @@ public class Canonicalizer20010315Exclus
}
}
+ /**
+ * Test default namespace behavior if its in the InclusiveNamespace prefix list.
+ *
+ * @throws Exception
+ */
+ @org.junit.Test
+ public void testPropagateDefaultNs1() throws Exception {
+ final String XML =
+ "<env:Envelope"
+ + " xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\""
+ + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""
+ + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ + " xmlns:ns0=\"http://xmlsoap.org/Ping\""
+ + " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">"
+ + "<env:Body wsu:Id=\"body\">"
+ + "<ns0:Ping xsi:type=\"ns0:ping\">"
+ + "<ns0:text xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "</ns0:Ping>"
+ + "</env:Body>"
+ + "</env:Envelope>";
+
+ final String c14nXML =
+ "<env:Body"
+ + " xmlns=\"\""
+ + " xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\""
+ + " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\""
+ + " wsu:Id=\"body\">"
+ + "<ns0:Ping xmlns:ns0=\"http://xmlsoap.org/Ping\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"ns0:ping\">"
+ + "<ns0:text xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "</ns0:Ping>"
+ + "</env:Body>";
+
+ Document doc = this.db.parse(new InputSource(new StringReader(XML)));
+ Canonicalizer20010315ExclOmitComments c14n =
+ new Canonicalizer20010315ExclOmitComments();
+ byte[] bytes = c14n.engineCanonicalizeSubTree(doc.getDocumentElement().getFirstChild(), "#default", true);
+ assertEquals(c14nXML, new String(bytes));
+ }
+
+ @org.junit.Test
+ public void testPropagateDefaultNs2() throws Exception {
+ final String XML =
+ "<env:Envelope"
+ + " xmlns=\"http://example.com\""
+ + " xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\""
+ + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""
+ + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ + " xmlns:ns0=\"http://xmlsoap.org/Ping\""
+ + " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">"
+ + "<env:Body wsu:Id=\"body\">"
+ + "<ns0:Ping xsi:type=\"ns0:ping\">"
+ + "<ns0:text xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "</ns0:Ping>"
+ + "</env:Body>"
+ + "</env:Envelope>";
+
+ final String c14nXML =
+ "<env:Body"
+ + " xmlns=\"http://example.com\""
+ + " xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\""
+ + " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\""
+ + " wsu:Id=\"body\">"
+ + "<ns0:Ping xmlns:ns0=\"http://xmlsoap.org/Ping\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"ns0:ping\">"
+ + "<ns0:text xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "</ns0:Ping>"
+ + "</env:Body>";
+
+ Document doc = this.db.parse(new InputSource(new StringReader(XML)));
+ Canonicalizer20010315ExclOmitComments c14n =
+ new Canonicalizer20010315ExclOmitComments();
+ byte[] bytes = c14n.engineCanonicalizeSubTree(doc.getDocumentElement().getFirstChild(), "#default", true);
+ assertEquals(c14nXML, new String(bytes));
+ }
+
+ @org.junit.Test
+ public void testPropagateDefaultNs3() throws Exception {
+ final String XML =
+ "<Envelope"
+ + " xmlns=\"http://example.com\""
+ + " xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\""
+ + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""
+ + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ + " xmlns:ns0=\"http://xmlsoap.org/Ping\""
+ + " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">"
+ + "<env:Body wsu:Id=\"body\">"
+ + "<ns0:Ping xsi:type=\"ns0:ping\">"
+ + "<ns0:text xmlns=\"\" xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "</ns0:Ping>"
+ + "</env:Body>"
+ + "</Envelope>";
+
+ final String c14nXML =
+ "<env:Body"
+ + " xmlns=\"http://example.com\""
+ + " xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\""
+ + " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\""
+ + " wsu:Id=\"body\">"
+ + "<ns0:Ping xmlns:ns0=\"http://xmlsoap.org/Ping\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"ns0:ping\">"
+ + "<ns0:text xmlns=\"\" xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "</ns0:Ping>"
+ + "</env:Body>";
+
+ Document doc = this.db.parse(new InputSource(new StringReader(XML)));
+ Canonicalizer20010315ExclOmitComments c14n =
+ new Canonicalizer20010315ExclOmitComments();
+ byte[] bytes = c14n.engineCanonicalizeSubTree(doc.getDocumentElement().getFirstChild(), "#default", true);
+ assertEquals(c14nXML, new String(bytes));
+ }
+
+ @org.junit.Test
+ public void testPropagateDefaultNs4() throws Exception {
+ final String XML =
+ "<Envelope"
+ + " xmlns=\"\""
+ + " xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\""
+ + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""
+ + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ + " xmlns:ns0=\"http://xmlsoap.org/Ping\""
+ + " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">"
+ + "<env:Body wsu:Id=\"body\">"
+ + "<ns0:Ping xsi:type=\"ns0:ping\">"
+ + "<ns0:text xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "</ns0:Ping>"
+ + "</env:Body>"
+ + "</Envelope>";
+
+ final String c14nXML =
+ "<env:Body"
+ + " xmlns=\"\""
+ + " xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\""
+ + " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\""
+ + " wsu:Id=\"body\">"
+ + "<ns0:Ping xmlns:ns0=\"http://xmlsoap.org/Ping\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"ns0:ping\">"
+ + "<ns0:text xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "</ns0:Ping>"
+ + "</env:Body>";
+
+ Document doc = this.db.parse(new InputSource(new StringReader(XML)));
+ Canonicalizer20010315ExclOmitComments c14n =
+ new Canonicalizer20010315ExclOmitComments();
+ byte[] bytes = c14n.engineCanonicalizeSubTree(doc.getDocumentElement().getFirstChild(), "#default", true);
+ assertEquals(c14nXML, new String(bytes));
+ }
+
+ @org.junit.Test
+ public void testPropagateDefaultNs5() throws Exception {
+ final String XML =
+ "<env:Envelope"
+ + " xmlns=\"http://example.com\""
+ + " xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\""
+ + " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""
+ + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+ + " xmlns:ns0=\"http://xmlsoap.org/Ping\""
+ + " xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\">"
+ + "<env:Body xmlns=\"\" wsu:Id=\"body\">"
+ + "<ns0:Ping xsi:type=\"ns0:ping\">"
+ + "<ns0:text xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "</ns0:Ping>"
+ + "</env:Body>"
+ + "</env:Envelope>";
+
+ final String c14nXML =
+ "<ns0:Ping xmlns=\"\" xmlns:ns0=\"http://xmlsoap.org/Ping\" " +
+ "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"ns0:ping\">"
+ + "<ns0:text xsi:type=\"xsd:string\">hello</ns0:text>"
+ + "</ns0:Ping>";
+
+ Document doc = this.db.parse(new InputSource(new StringReader(XML)));
+ Canonicalizer20010315ExclOmitComments c14n =
+ new Canonicalizer20010315ExclOmitComments();
+ byte[] bytes = c14n.engineCanonicalizeSubTree(doc.getDocumentElement().getFirstChild().getFirstChild(), "#default", true);
+ assertEquals(c14nXML, new String(bytes));
+ }
+
private String getAbsolutePath(String path) {
String basedir = System.getProperty("basedir");
if (basedir != null && !"".equals(basedir)) {
Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/c14n/implementations/MockCanonicalizationMethod.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/c14n/implementations/MockCanonicalizationMethod.java?rev=1460135&r1=1460134&r2=1460135&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/c14n/implementations/MockCanonicalizationMethod.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/dom/c14n/implementations/MockCanonicalizationMethod.java Sat Mar 23 12:38:13 2013
@@ -46,6 +46,11 @@ public class MockCanonicalizationMethod
return _impl.engineCanonicalizeSubTree(rootNode, inclusiveNamespaces);
}
+ public byte[] engineCanonicalizeSubTree(Node rootNode, String inclusiveNamespaces, boolean propagateDefaultNamespace)
+ throws CanonicalizationException {
+ return _impl.engineCanonicalizeSubTree(rootNode, inclusiveNamespaces, propagateDefaultNamespace);
+ }
+
public byte[] engineCanonicalizeXPathNodeSet(Set<Node> xpathNodeSet)
throws CanonicalizationException {
return _impl.engineCanonicalizeXPathNodeSet(xpathNodeSet);