You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by ra...@apache.org on 2008/01/20 22:59:43 UTC
svn commit: r613687 - in /xml/security/trunk:
src/org/apache/xml/security/keys/keyresolver/implementations/
src/org/apache/xml/security/utils/
src_unitTests/org/apache/xml/security/test/
src_unitTests/org/apache/xml/security/test/c14n/implementations/ ...
Author: raul
Date: Sun Jan 20 13:59:42 2008
New Revision: 613687
URL: http://svn.apache.org/viewvc?rev=613687&view=rev
Log:
-Refactor a method only used in tests into his own class
-Keep fixing the equals for namespaces
Added:
xml/security/trunk/src_unitTests/org/apache/xml/security/test/TestUtils.java
Modified:
xml/security/trunk/src/org/apache/xml/security/keys/keyresolver/implementations/DSAKeyValueResolver.java
xml/security/trunk/src/org/apache/xml/security/keys/keyresolver/implementations/RSAKeyValueResolver.java
xml/security/trunk/src/org/apache/xml/security/utils/ElementChecker.java
xml/security/trunk/src/org/apache/xml/security/utils/ElementCheckerImpl.java
xml/security/trunk/src/org/apache/xml/security/utils/XMLUtils.java
xml/security/trunk/src_unitTests/org/apache/xml/security/test/c14n/implementations/Canonicalizer20010315Test.java
xml/security/trunk/src_unitTests/org/apache/xml/security/test/encryption/BaltimoreEncTest.java
xml/security/trunk/src_unitTests/org/apache/xml/security/test/interop/InteropTest.java
xml/security/trunk/src_unitTests/org/apache/xml/security/test/signature/CreateSignatureTest.java
xml/security/trunk/src_unitTests/org/apache/xml/security/test/signature/UnknownAlgoSignatureTest.java
xml/security/trunk/src_unitTests/org/apache/xml/security/test/transforms/implementations/TransformBase64DecodeTest.java
xml/security/trunk/src_unitTests/org/apache/xml/security/test/transforms/implementations/TransformXSLTTest.java
Modified: xml/security/trunk/src/org/apache/xml/security/keys/keyresolver/implementations/DSAKeyValueResolver.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/keys/keyresolver/implementations/DSAKeyValueResolver.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/keys/keyresolver/implementations/DSAKeyValueResolver.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/keys/keyresolver/implementations/DSAKeyValueResolver.java Sun Jan 20 13:59:42 2008
@@ -53,13 +53,11 @@
Element dsaKeyElement=null;
boolean isKeyValue = XMLUtils.elementIsInSignatureSpace(element,
Constants._TAG_KEYVALUE);
- boolean isDSAKeyValue = XMLUtils.elementIsInSignatureSpace(element,
- Constants._TAG_DSAKEYVALUE);
-
if (isKeyValue) {
dsaKeyElement =
XMLUtils.selectDsNode(element.getFirstChild(),Constants._TAG_DSAKEYVALUE,0);
- } else if (isDSAKeyValue) {
+ } else if (XMLUtils.elementIsInSignatureSpace(element,
+ Constants._TAG_DSAKEYVALUE)) {
// this trick is needed to allow the RetrievalMethodResolver to eat a
// ds:DSAKeyValue directly (without KeyValue)
dsaKeyElement = element;
Modified: xml/security/trunk/src/org/apache/xml/security/keys/keyresolver/implementations/RSAKeyValueResolver.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/keys/keyresolver/implementations/RSAKeyValueResolver.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/keys/keyresolver/implementations/RSAKeyValueResolver.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/keys/keyresolver/implementations/RSAKeyValueResolver.java Sun Jan 20 13:59:42 2008
@@ -57,13 +57,12 @@
boolean isKeyValue = XMLUtils.elementIsInSignatureSpace(element,
Constants._TAG_KEYVALUE);
- boolean isRSAKeyValue = XMLUtils.elementIsInSignatureSpace(element,
- Constants._TAG_RSAKEYVALUE);
Element rsaKeyElement=null;
if (isKeyValue) {
rsaKeyElement = XMLUtils.selectDsNode(element.getFirstChild(),
Constants._TAG_RSAKEYVALUE, 0);
- } else if (isRSAKeyValue) {
+ } else if (XMLUtils.elementIsInSignatureSpace(element,
+ Constants._TAG_RSAKEYVALUE)) {
// this trick is needed to allow the RetrievalMethodResolver to eat a
// ds:RSAKeyValue directly (without KeyValue)
rsaKeyElement = element;
Modified: xml/security/trunk/src/org/apache/xml/security/utils/ElementChecker.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/utils/ElementChecker.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/utils/ElementChecker.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/utils/ElementChecker.java Sun Jan 20 13:59:42 2008
@@ -2,6 +2,7 @@
import org.apache.xml.security.exceptions.XMLSecurityException;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
public interface ElementChecker {
/**
@@ -9,6 +10,8 @@
*
* @throws XMLSecurityException
*/
- void guaranteeThatElementInCorrectSpace(ElementProxy expected, Element actual)
+ public void guaranteeThatElementInCorrectSpace(ElementProxy expected, Element actual)
throws XMLSecurityException;
+
+ public boolean isNamespaceElement(Node el, String type, String ns);
}
Modified: xml/security/trunk/src/org/apache/xml/security/utils/ElementCheckerImpl.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/utils/ElementCheckerImpl.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/utils/ElementCheckerImpl.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/utils/ElementCheckerImpl.java Sun Jan 20 13:59:42 2008
@@ -2,10 +2,19 @@
import org.apache.xml.security.exceptions.XMLSecurityException;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
-public class ElementCheckerImpl {
+public abstract class ElementCheckerImpl implements ElementChecker {
+ public boolean isNamespaceElement(Node el, String type, String ns) {
+ if ((el == null) ||
+ ns!=el.getNamespaceURI() || !el.getLocalName().equals(type)){
+ return false;
+ }
+
+ return true;
+ }
/** A checker for DOM that interns NS */
- public static class InternedNsChecker implements ElementChecker {
+ public static class InternedNsChecker extends ElementCheckerImpl{
public void guaranteeThatElementInCorrectSpace(ElementProxy expected,
Element actual) throws XMLSecurityException {
@@ -24,7 +33,7 @@
}
/** A checker for DOM that interns NS */
- public static class FullChecker implements ElementChecker {
+ public static class FullChecker extends ElementCheckerImpl {
public void guaranteeThatElementInCorrectSpace(ElementProxy expected,
Element actual) throws XMLSecurityException {
@@ -43,7 +52,7 @@
}
/** An empty checker if schema checking is used */
- public static class EmptyChecker implements ElementChecker {
+ public static class EmptyChecker extends ElementCheckerImpl {
public void guaranteeThatElementInCorrectSpace(ElementProxy expected,
Element actual) throws XMLSecurityException {
}
Modified: xml/security/trunk/src/org/apache/xml/security/utils/XMLUtils.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/utils/XMLUtils.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/utils/XMLUtils.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/utils/XMLUtils.java Sun Jan 20 13:59:42 2008
@@ -27,6 +27,8 @@
import java.util.Map;
import java.util.Set;
+import javax.xml.XMLConstants;
+
import org.apache.xml.security.c14n.CanonicalizationException;
import org.apache.xml.security.c14n.Canonicalizer;
import org.apache.xml.security.c14n.InvalidCanonicalizerException;
@@ -267,17 +269,7 @@
*/
public static boolean elementIsInSignatureSpace(Element element,
String localName) {
-
- if ((element == null) ||
- Constants.SignatureSpecNS!=element.getNamespaceURI() ){
- return false;
- }
-
- if (!element.getLocalName().equals(localName)) {
- return false;
- }
-
- return true;
+ return ElementProxy.checker.isNamespaceElement(element, localName, Constants.SignatureSpecNS);
}
/**
@@ -290,18 +282,7 @@
*/
public static boolean elementIsInEncryptionSpace(Element element,
String localName) {
-
- if ((element == null) ||
- EncryptionConstants.EncryptionSpecNS!=element.getNamespaceURI()
- ){
- return false;
- }
-
- if (!element.getLocalName().equals(localName)) {
- return false;
- }
-
- return true;
+ return ElementProxy.checker.isNamespaceElement(element, localName, EncryptionConstants.EncryptionSpecNS);
}
/**
@@ -362,32 +343,6 @@
}
-
- /**
- * Method createDSctx
- *
- * @param doc
- * @param prefix
- * @param namespace
- * @return the element.
- */
- public static Element createDSctx(Document doc, String prefix,
- String namespace) {
-
- if ((prefix == null) || (prefix.trim().length() == 0)) {
- throw new IllegalArgumentException("You must supply a prefix");
- }
-
- Element ctx = doc.createElementNS(null, "namespaceContext");
-
- ctx.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:" + prefix.trim(),
- namespace);
-
- return ctx;
- }
-
-
-
/**
* Method addReturnToElement
*
@@ -402,7 +357,6 @@
}
public static void addReturnToElement(Document doc, HelperNodeList nl) {
-
if (!ignoreLineBreaks) {
nl.appendChild(doc.createTextNode("\n"));
}
@@ -535,8 +489,7 @@
*/
public static Element selectDsNode(Node sibling, String nodeName, int number) {
while (sibling!=null) {
- if (nodeName.equals(sibling.getLocalName())
- && Constants.SignatureSpecNS==sibling.getNamespaceURI()) {
+ if (ElementProxy.checker.isNamespaceElement(sibling, nodeName, Constants.SignatureSpecNS )) {
if (number==0){
return (Element)sibling;
}
@@ -556,8 +509,7 @@
public static Element selectXencNode(Node sibling, String nodeName, int number) {
while (sibling!=null) {
- if (nodeName.equals(sibling.getLocalName())
- && EncryptionConstants.EncryptionSpecNS==sibling.getNamespaceURI()) {
+ if (ElementProxy.checker.isNamespaceElement(sibling, nodeName, EncryptionConstants.EncryptionSpecNS )) {
if (number==0){
return (Element)sibling;
}
@@ -615,8 +567,7 @@
*/
public static Element selectNode(Node sibling, String uri,String nodeName, int number) {
while (sibling!=null) {
- if (nodeName.equals(sibling.getLocalName())
- && uri==sibling.getNamespaceURI()) {
+ if (ElementProxy.checker.isNamespaceElement(sibling, nodeName, uri)) {
if (number==0){
return (Element)sibling;
}
@@ -647,8 +598,7 @@
int curr=0;
//List list=new ArrayList();
while (sibling!=null) {
- if (nodeName.equals(sibling.getLocalName())
- && uri==sibling.getNamespaceURI()) {
+ if (ElementProxy.checker.isNamespaceElement(sibling, nodeName, uri)) {
a[curr++]=(Element)sibling;
if (size<=curr) {
int cursize= size<<2;
Added: xml/security/trunk/src_unitTests/org/apache/xml/security/test/TestUtils.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src_unitTests/org/apache/xml/security/test/TestUtils.java?rev=613687&view=auto
==============================================================================
--- xml/security/trunk/src_unitTests/org/apache/xml/security/test/TestUtils.java (added)
+++ xml/security/trunk/src_unitTests/org/apache/xml/security/test/TestUtils.java Sun Jan 20 13:59:42 2008
@@ -0,0 +1,32 @@
+package org.apache.xml.security.test;
+
+import org.apache.xml.security.utils.Constants;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+public class TestUtils {
+
+ /**
+ * Method createDSctx
+ *
+ * @param doc
+ * @param prefix
+ * @param namespace
+ * @return the element.
+ */
+ public static Element createDSctx(Document doc, String prefix,
+ String namespace) {
+
+ if ((prefix == null) || (prefix.trim().length() == 0)) {
+ throw new IllegalArgumentException("You must supply a prefix");
+ }
+
+ Element ctx = doc.createElementNS(null, "namespaceContext");
+
+ ctx.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:" + prefix.trim(),
+ namespace);
+
+ return ctx;
+ }
+
+}
Modified: xml/security/trunk/src_unitTests/org/apache/xml/security/test/c14n/implementations/Canonicalizer20010315Test.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src_unitTests/org/apache/xml/security/test/c14n/implementations/Canonicalizer20010315Test.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src_unitTests/org/apache/xml/security/test/c14n/implementations/Canonicalizer20010315Test.java (original)
+++ xml/security/trunk/src_unitTests/org/apache/xml/security/test/c14n/implementations/Canonicalizer20010315Test.java Sun Jan 20 13:59:42 2008
@@ -44,6 +44,7 @@
import org.apache.xml.security.c14n.CanonicalizationException;
import org.apache.xml.security.c14n.Canonicalizer;
import org.apache.xml.security.c14n.InvalidCanonicalizerException;
+import org.apache.xml.security.test.TestUtils;
import org.apache.xml.security.test.resource.TestVectorResolver;
import org.apache.xml.security.utils.Constants;
import org.apache.xml.security.utils.IgnoreAllErrorHandler;
@@ -647,7 +648,7 @@
Document doc = db.parse(resolver.resolveEntity(null, fileIn));
//J-
- Element nscontext = XMLUtils.createDSctx(doc, "ietf", "http://www.ietf.org");
+ Element nscontext = TestUtils.createDSctx(doc, "ietf", "http://www.ietf.org");
String xpath = "(//. | //@* | //namespace::*)"
+ "[ "
Modified: xml/security/trunk/src_unitTests/org/apache/xml/security/test/encryption/BaltimoreEncTest.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src_unitTests/org/apache/xml/security/test/encryption/BaltimoreEncTest.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src_unitTests/org/apache/xml/security/test/encryption/BaltimoreEncTest.java (original)
+++ xml/security/trunk/src_unitTests/org/apache/xml/security/test/encryption/BaltimoreEncTest.java Sun Jan 20 13:59:42 2008
@@ -45,8 +45,8 @@
import org.apache.xml.security.keys.content.X509Data;
import org.apache.xml.security.keys.content.x509.XMLX509Certificate;
import org.apache.xml.security.keys.keyresolver.KeyResolver;
+import org.apache.xml.security.test.TestUtils;
import org.apache.xml.security.utils.JavaUtils;
-import org.apache.xml.security.utils.XMLUtils;
import org.apache.xpath.XPathAPI;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -210,7 +210,7 @@
throws javax.xml.transform.TransformerException {
Element nscontext =
- XMLUtils.createDSctx(doc, "x",
+ TestUtils.createDSctx(doc, "x",
"urn:example:po");
Node ccnumElt =
XPathAPI.selectSingleNode(doc, "//x:Number/text()", nscontext);
Modified: xml/security/trunk/src_unitTests/org/apache/xml/security/test/interop/InteropTest.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src_unitTests/org/apache/xml/security/test/interop/InteropTest.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src_unitTests/org/apache/xml/security/test/interop/InteropTest.java (original)
+++ xml/security/trunk/src_unitTests/org/apache/xml/security/test/interop/InteropTest.java Sun Jan 20 13:59:42 2008
@@ -27,9 +27,9 @@
import org.apache.xml.security.keys.KeyInfo;
import org.apache.xml.security.signature.Reference;
import org.apache.xml.security.signature.XMLSignature;
+import org.apache.xml.security.test.TestUtils;
import org.apache.xml.security.utils.Constants;
import org.apache.xml.security.utils.JavaUtils;
-import org.apache.xml.security.utils.XMLUtils;
import org.apache.xml.security.utils.resolver.ResourceResolverSpi;
import org.apache.xpath.XPathAPI;
import org.w3c.dom.Element;
@@ -81,7 +81,7 @@
File f = new File(filename);
javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
org.w3c.dom.Document doc = db.parse(new java.io.FileInputStream(f));
- Element nscontext = XMLUtils.createDSctx(doc, "ds",
+ Element nscontext = TestUtils.createDSctx(doc, "ds",
Constants.SignatureSpecNS);
Element sigElement = (Element) XPathAPI.selectSingleNode(doc,
"//ds:Signature[1]", nscontext);
@@ -113,7 +113,7 @@
File f = new File(filename);
javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
org.w3c.dom.Document doc = db.parse(f);
- Element nscontext = XMLUtils.createDSctx(doc, "ds",
+ Element nscontext = TestUtils.createDSctx(doc, "ds",
Constants.SignatureSpecNS);
Element sigElement = (Element) XPathAPI.selectSingleNode(doc,
"//ds:Signature[1]", nscontext);
Modified: xml/security/trunk/src_unitTests/org/apache/xml/security/test/signature/CreateSignatureTest.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src_unitTests/org/apache/xml/security/test/signature/CreateSignatureTest.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src_unitTests/org/apache/xml/security/test/signature/CreateSignatureTest.java (original)
+++ xml/security/trunk/src_unitTests/org/apache/xml/security/test/signature/CreateSignatureTest.java Sun Jan 20 13:59:42 2008
@@ -32,6 +32,7 @@
import org.apache.xml.security.c14n.Canonicalizer;
import org.apache.xml.security.keys.KeyInfo;
import org.apache.xml.security.signature.ObjectContainer;
+import org.apache.xml.security.test.TestUtils;
import org.apache.xml.security.transforms.Transforms;
import org.apache.xml.security.transforms.params.XPathContainer;
import org.apache.xml.security.signature.XMLSignature;
@@ -183,7 +184,7 @@
void doVerify(String signedXML) throws Exception {
org.w3c.dom.Document doc = db.parse(new ByteArrayInputStream(signedXML.getBytes()));
- Element nscontext = XMLUtils.createDSctx(doc, "ds",Constants.SignatureSpecNS);
+ Element nscontext = TestUtils.createDSctx(doc, "ds",Constants.SignatureSpecNS);
Element sigElement = (Element) XPathAPI.selectSingleNode(doc,"//ds:Signature[1]", nscontext);
XMLSignature signature = new XMLSignature(sigElement, "");
KeyInfo ki = signature.getKeyInfo();
Modified: xml/security/trunk/src_unitTests/org/apache/xml/security/test/signature/UnknownAlgoSignatureTest.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src_unitTests/org/apache/xml/security/test/signature/UnknownAlgoSignatureTest.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src_unitTests/org/apache/xml/security/test/signature/UnknownAlgoSignatureTest.java (original)
+++ xml/security/trunk/src_unitTests/org/apache/xml/security/test/signature/UnknownAlgoSignatureTest.java Sun Jan 20 13:59:42 2008
@@ -41,8 +41,8 @@
import org.apache.xml.security.exceptions.XMLSecurityException;
import org.apache.xml.security.signature.XMLSignature;
import org.apache.xml.security.signature.XMLSignatureException;
+import org.apache.xml.security.test.TestUtils;
import org.apache.xml.security.utils.Constants;
-import org.apache.xml.security.utils.XMLUtils;
import org.apache.xpath.XPathAPI;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -152,7 +152,7 @@
file = new File(SIGNATURE_SOURCE_PATH, fileName);
}
Document doc = getDocument(file);
- Element nscontext = XMLUtils.createDSctx(doc, "ds",
+ Element nscontext = TestUtils.createDSctx(doc, "ds",
Constants.SignatureSpecNS);
Element signatureEl = (Element) XPathAPI.selectSingleNode(doc,
"//ds:Signature[1]", nscontext);
Modified: xml/security/trunk/src_unitTests/org/apache/xml/security/test/transforms/implementations/TransformBase64DecodeTest.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src_unitTests/org/apache/xml/security/test/transforms/implementations/TransformBase64DecodeTest.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src_unitTests/org/apache/xml/security/test/transforms/implementations/TransformBase64DecodeTest.java (original)
+++ xml/security/trunk/src_unitTests/org/apache/xml/security/test/transforms/implementations/TransformBase64DecodeTest.java Sun Jan 20 13:59:42 2008
@@ -34,6 +34,7 @@
import org.apache.xml.security.exceptions.XMLSecurityException;
import org.apache.xml.security.signature.XMLSignatureException;
import org.apache.xml.security.signature.XMLSignatureInput;
+import org.apache.xml.security.test.TestUtils;
import org.apache.xml.security.transforms.InvalidTransformException;
import org.apache.xml.security.transforms.TransformationException;
import org.apache.xml.security.transforms.Transforms;
@@ -232,7 +233,7 @@
Document doc = db.parse(new ByteArrayInputStream(input.getBytes()));
//XMLUtils.circumventBug2650(doc);
- Element nscontext = XMLUtils.createDSctx(doc, "ds", Constants.SignatureSpecNS);
+ Element nscontext = TestUtils.createDSctx(doc, "ds", Constants.SignatureSpecNS);
Node base64Node = XPathAPI.selectSingleNode(doc, "//ds:Base64", nscontext);
XMLSignatureInput xmlinput = new XMLSignatureInput(base64Node);
Modified: xml/security/trunk/src_unitTests/org/apache/xml/security/test/transforms/implementations/TransformXSLTTest.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src_unitTests/org/apache/xml/security/test/transforms/implementations/TransformXSLTTest.java?rev=613687&r1=613686&r2=613687&view=diff
==============================================================================
--- xml/security/trunk/src_unitTests/org/apache/xml/security/test/transforms/implementations/TransformXSLTTest.java (original)
+++ xml/security/trunk/src_unitTests/org/apache/xml/security/test/transforms/implementations/TransformXSLTTest.java Sun Jan 20 13:59:42 2008
@@ -32,10 +32,10 @@
import junit.framework.TestSuite;
import org.apache.xml.security.signature.XMLSignatureInput;
+import org.apache.xml.security.test.TestUtils;
import org.apache.xml.security.transforms.Transform;
import org.apache.xml.security.transforms.Transforms;
import org.apache.xml.security.utils.Constants;
-import org.apache.xml.security.utils.XMLUtils;
import org.apache.xpath.XPathAPI;
public class TransformXSLTTest extends TestCase {
@@ -95,7 +95,7 @@
Document doc1 = getDocument(file1);
Document doc2 = getDocument(file2);
- Element nscontext = XMLUtils.createDSctx
+ Element nscontext = TestUtils.createDSctx
(doc1, "dsig", Constants.SignatureSpecNS);
Node transformEl = XPathAPI.selectSingleNode
(doc1, "//dsig:Transform[1]", nscontext);