Index: build.xml
===================================================================
--- build.xml (revision 778372)
+++ build.xml (working copy)
@@ -362,14 +362,7 @@
-
-
-
-
-
-
-
-
+
Index: src_unitTests/org/apache/xml/security/test/encryption/EncryptContentTest.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/encryption/EncryptContentTest.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/encryption/EncryptContentTest.java (working copy)
@@ -98,7 +98,7 @@
// child should be EncryptedData, if not throw exception
Element childElem = (Element) child;
if (!childElem.getLocalName().equals("EncryptedData")) {
- t.transform(new DOMSource(doc), new StreamResult(System.out));
+ // t.transform(new DOMSource(doc), new StreamResult(System.out));
throw new Exception("Element content not replaced");
}
// there shouldn't be any more children elements
@@ -107,10 +107,10 @@
sibling = sibling.getNextSibling();
}
if (sibling != null) {
- t.transform(new DOMSource(doc), new StreamResult(System.out));
+ // t.transform(new DOMSource(doc), new StreamResult(System.out));
throw new Exception("Sibling element content not replaced");
}
- t.transform(new DOMSource(doc), new StreamResult(System.out));
+ // t.transform(new DOMSource(doc), new StreamResult(System.out));
}
}
Index: src_unitTests/org/apache/xml/security/test/transforms/RegisterTest.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/transforms/RegisterTest.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/transforms/RegisterTest.java (working copy)
@@ -7,7 +7,9 @@
import org.apache.xml.security.exceptions.AlgorithmAlreadyRegisteredException;
import org.apache.xml.security.transforms.Transform;
+import junit.framework.Test;
import junit.framework.TestCase;
+import junit.framework.TestSuite;
/**
* RegisterTest tests registering a custom Transform implementation loaded
@@ -21,6 +23,10 @@
super(name);
}
+ public static Test suite() {
+ return new TestSuite(RegisterTest.class);
+ }
+
public static void test() throws Exception {
Transform.init();
Index: src_unitTests/org/apache/xml/security/test/transforms/implementations/AllTests.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/transforms/implementations/AllTests.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/transforms/implementations/AllTests.java (working copy)
@@ -10,6 +10,7 @@
"Test for org.apache.xml.security.test.transforms.implementations");
//$JUnit-BEGIN$
suite.addTest(TransformBase64DecodeTest.suite());
+ suite.addTest(TransformXSLTTest.suite());
suite.addTest(Xpath2TransformationTest.suite());
//$JUnit-END$
return suite;
Index: src_unitTests/org/apache/xml/security/test/signature/InvalidKeyTest.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/signature/InvalidKeyTest.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/signature/InvalidKeyTest.java (working copy)
@@ -12,7 +12,9 @@
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
+import junit.framework.Test;
import junit.framework.TestCase;
+import junit.framework.TestSuite;
/**
* Test case contributed by Matthias Germann for testing that bug 43239 is
@@ -25,6 +27,10 @@
Init.init();
}
+ public static Test suite() {
+ return new TestSuite(InvalidKeyTest.class);
+ }
+
private static final String BASEDIR = System.getProperty("basedir");
private static final String SEP = System.getProperty("file.separator");
@@ -36,8 +42,9 @@
try {
validate(trustStore.getCertificate("bedag-test").getPublicKey());
+ throw new Exception("Failure expected on a DSA key");
} catch (Exception e) {
- e.printStackTrace();
+ // e.printStackTrace();
}
validate(trustStore.getCertificate("a70-garaio-frontend-u").getPublicKey());
}
@@ -56,6 +63,6 @@
XMLSignature si = new XMLSignature((Element)n,"");
si.checkSignatureValue(pk);
- System.out.println("VALIDATION OK" );
+ // System.out.println("VALIDATION OK" );
}
}
Index: src_unitTests/org/apache/xml/security/test/signature/SignatureTest.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/signature/SignatureTest.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/signature/SignatureTest.java (working copy)
@@ -40,6 +40,10 @@
super(test);
}
+ public static Test suite() {
+ return new TestSuite(SignatureTest.class);
+ }
+
/**
* Loads the 'localhost' keystore from the test keystore.
*
Index: src_unitTests/org/apache/xml/security/test/signature/AllTests.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/signature/AllTests.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/signature/AllTests.java (working copy)
@@ -11,9 +11,13 @@
//$JUnit-BEGIN$
suite.addTest(CreateSignatureTest.suite());
suite.addTestSuite(X509DataTest.class);
+ suite.addTestSuite(SignatureTest.class);
+ suite.addTestSuite(XmlSecTest.class);
+ suite.addTestSuite(InvalidKeyTest.class);
suite.addTest(XMLSignatureInputTest.suite());
suite.addTest(UnknownAlgoSignatureTest.suite());
suite.addTest(KeyValueTest.suite());
+ suite.addTest(NoKeyInfoTest.suite());
//$JUnit-END$
return suite;
}
Index: src_unitTests/org/apache/xml/security/test/signature/XmlSecTest.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/signature/XmlSecTest.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/signature/XmlSecTest.java (working copy)
@@ -42,7 +42,9 @@
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
+import junit.framework.Test;
import junit.framework.TestCase;
+import junit.framework.TestSuite;
/**
* Tests creating and validating an XML Signature with an XPath Transform.
@@ -56,6 +58,10 @@
org.apache.commons.logging.LogFactory.getLog
(XmlSecTest.class.getName());
+ public static Test suite() {
+ return new TestSuite(XmlSecTest.class);
+ }
+
public void testCheckXmlSignatureSoftwareStack() throws Exception {
checkXmlSignatureSoftwareStack(false);
}
@@ -131,9 +137,9 @@
signature.sign(privateKey);
- TransformerFactory tf = TransformerFactory.newInstance();
- Transformer t = tf.newTransformer();
- t.transform(new DOMSource(testDocument), new StreamResult(System.out));
+ // TransformerFactory tf = TransformerFactory.newInstance();
+ // Transformer t = tf.newTransformer();
+ // t.transform(new DOMSource(testDocument), new StreamResult(System.out));
NodeList signatureElems = XPathAPI.selectNodeList(testDocument,
"//ds:Signature", nsElement);
Index: src_unitTests/org/apache/xml/security/test/ModuleTest.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/ModuleTest.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/ModuleTest.java (working copy)
@@ -44,15 +44,22 @@
//J-
suite.addTest(org.apache.xml.security.test.c14n.helper.C14nHelperTest.suite());
+ suite.addTest(org.apache.xml.security.test.c14n.helper.AttrCompareTest.suite());
suite.addTest(org.apache.xml.security.test.c14n.implementations.Canonicalizer20010315Test.suite());
suite.addTest(org.apache.xml.security.test.c14n.implementations.Canonicalizer20010315ExclusiveTest.suite());
+ suite.addTest(org.apache.xml.security.test.c14n.implementations.ExclusiveC14NInterop.suite());
+ suite.addTest(org.apache.xml.security.test.c14n.implementations.Bug45961Test.suite());
suite.addTest(org.apache.xml.security.test.external.org.apache.xalan.XPathAPI.XalanBug1425Test.suite());
suite.addTest(org.apache.xml.security.test.external.org.apache.xalan.XPathAPI.AttributeAncestorOrSelfTest.suite());
suite.addTest(org.apache.xml.security.test.signature.AllTests.suite());
suite.addTest(org.apache.xml.security.test.utils.AllTests.suite());
suite.addTest(org.apache.xml.security.c14n.implementations.AllTests.suite());
suite.addTest(org.apache.xml.security.test.transforms.implementations.AllTests.suite());
+ suite.addTest(org.apache.xml.security.test.transforms.RegisterTest.suite());
suite.addTest(org.apache.xml.security.test.algorithms.AllTests.suite());
+ suite.addTest(org.apache.xml.security.test.keys.content.x509.XMLX509SKITest.suite());
+ suite.addTest(org.apache.xml.security.test.keys.content.x509.XMLX509IssuerSerialTest.suite());
+ suite.addTest(org.apache.xml.security.test.keys.content.x509.XMLX509CertificateTest.suite());
// suite.addTest(org.apache.xml.security.test.algorithms.implementations.KeyWrapTest.suite());
// suite.addTest(org.apache.xml.security.test.algorithms.implementations.BlockEncryptionTest.suite());
//J+
Index: src_unitTests/org/apache/xml/security/test/c14n/helper/AttrCompareTest.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/c14n/helper/AttrCompareTest.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/c14n/helper/AttrCompareTest.java (working copy)
@@ -156,7 +156,7 @@
Attr attr0 = doc.createAttributeNS(null, "foo");
Attr attr1 = doc.createAttributeNS("http://goo", "goo:foo");
- System.out.println("Attr1: " + attr1 + " (" + attr1.getLocalName() +")");
+ // System.out.println("Attr1: " + attr1 + " (" + attr1.getLocalName() +")");
AttrCompare attrCompare = new AttrCompare();
Index: src_unitTests/org/apache/xml/security/test/c14n/implementations/Bug45961Test.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/c14n/implementations/Bug45961Test.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/c14n/implementations/Bug45961Test.java (working copy)
@@ -22,7 +22,9 @@
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
+import junit.framework.Test;
import junit.framework.TestCase;
+import junit.framework.TestSuite;
public class Bug45961Test extends TestCase {
@@ -32,6 +34,10 @@
private static final String ALIAS = "mullan";
private DocumentBuilder _builder;
+ public static Test suite() {
+ return new TestSuite(Bug45961Test.class);
+ }
+
@Override
protected void setUp() throws Exception {
Init.init();
Index: src_unitTests/org/apache/xml/security/test/keys/content/x509/XMLX509IssuerSerialTest.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/keys/content/x509/XMLX509IssuerSerialTest.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/keys/content/x509/XMLX509IssuerSerialTest.java (working copy)
@@ -57,10 +57,10 @@
XMLX509IssuerSerial is =
new XMLX509IssuerSerial(doc, issuer, 0);
assertEquals(issuer, is.getIssuerName());
- System.out.println(is.getIssuerName());
+ // System.out.println(is.getIssuerName());
issuer = "CN=#abc123";
is = new XMLX509IssuerSerial(doc, issuer, 0);
assertEquals("CN=\\#abc123", is.getIssuerName());
- System.out.println(is.getIssuerName());
+ // System.out.println(is.getIssuerName());
}
}
Index: src_unitTests/org/apache/xml/security/test/keys/content/x509/XMLX509CertificateTest.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/keys/content/x509/XMLX509CertificateTest.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/keys/content/x509/XMLX509CertificateTest.java (working copy)
@@ -67,6 +67,6 @@
XMLX509Certificate xmlCert =
new XMLX509Certificate((Element) nl.item(0), "");
X509Certificate cert = xmlCert.getX509Certificate();
- System.out.println(cert);
+ // System.out.println(cert);
}
}
Index: src_unitTests/org/apache/xml/security/test/AllTests.java
===================================================================
--- src_unitTests/org/apache/xml/security/test/AllTests.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/test/AllTests.java (working copy)
@@ -51,6 +51,7 @@
//J-
suite.addTest(org.apache.xml.security.test.ModuleTest.suite());
suite.addTest(org.apache.xml.security.test.InteropTest.suite());
+ suite.addTest(org.apache.xml.security.test.EncryptionTest.suite());
//J+
return suite;
Index: src_unitTests/org/apache/xml/security/c14n/implementations/UtfHelperTest.java
===================================================================
--- src_unitTests/org/apache/xml/security/c14n/implementations/UtfHelperTest.java (revision 778372)
+++ src_unitTests/org/apache/xml/security/c14n/implementations/UtfHelperTest.java (working copy)
@@ -39,7 +39,7 @@
String str=new String(chs);
byte a[]=UtfHelpper.getStringInUtf8(str);
try {
- System.out.println("chunk:"+j);
+ // System.out.println("chunk:"+j);
byte correct[]=str.getBytes("UTF8");
assertTrue("UtfHelper.getStringInUtf8 failse",Arrays.equals(correct, a));
assertTrue("UtfHelper.getStringInUtf8 failse",Arrays.equals(correct, charByCharOs.toByteArray()));
Index: src_unitTests/javax/xml/crypto/test/dsig/SecureXSLTTest.java
===================================================================
--- src_unitTests/javax/xml/crypto/test/dsig/SecureXSLTTest.java (revision 778372)
+++ src_unitTests/javax/xml/crypto/test/dsig/SecureXSLTTest.java (working copy)
@@ -38,7 +38,7 @@
File f = new File("doc.xml");
for (int i=0; i