|
From: <pe...@us...> - 2003-11-21 05:06:43
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/test/org/neuclear/id/verifier
Modified Files:
VerificationTest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: VerificationTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/verifier/VerificationTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** VerificationTest.java 15 Nov 2003 01:58:19 -0000 1.7
--- VerificationTest.java 21 Nov 2003 04:45:17 -0000 1.8
***************
*** 31,34 ****
--- 31,40 ----
$Id$
$Log$
+ Revision 1.8 2003/11/21 04:45:17 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.7 2003/11/15 01:58:19 pelle
More work all around on web applications.
***************
*** 68,73 ****
* Time: 11:38:01 AM
*/
! public class VerificationTest extends TestCase {
! public VerificationTest(String string) {
super(string);
--- 74,79 ----
* Time: 11:38:01 AM
*/
! public final class VerificationTest extends TestCase {
! public VerificationTest(final String string) {
super(string);
***************
*** 76,112 ****
}
! public void testSimple() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/simple", true);
}
! public void testSimpleSecond() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/simple", true);
}
! public void testFakes() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/fakes", false);
}
! public void runDirectoryTest(String path, boolean wantValid) throws DocumentException, IOException, FileNotFoundException, NeuClearException, XMLException {
! File dir = new File(path);
if (!dir.exists()) {
System.out.println("Doesnt exist");
return;
}
! FilenameFilter filter;
filter = new FilenameFilter() {
! public boolean accept(File dirf, String name) {
return name.endsWith(".id");
}
};
! File xmlfiles[] = dir.listFiles(filter);
System.out.println("There are " + xmlfiles.length + " files in the directory");
for (int i = 0; i < xmlfiles.length; i++) {
! File xmlfile = xmlfiles[i];
System.out.print("Testing file: " + xmlfile.getName() + "... ");
try {
! SignedNamedObject obj = reader.read(new FileInputStream(xmlfile));
System.out.println("Name : " + obj.getName() + " VERIFIED");
assertTrue(wantValid);
--- 82,118 ----
}
! public final void testSimple() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/simple", true);
}
! public final void testSimpleSecond() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/simple", true);
}
! public final void testFakes() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/fakes", false);
}
! public final void runDirectoryTest(final String path, final boolean wantValid) throws DocumentException, IOException, FileNotFoundException, NeuClearException, XMLException {
! final File dir = new File(path);
if (!dir.exists()) {
System.out.println("Doesnt exist");
return;
}
! final FilenameFilter filter;
filter = new FilenameFilter() {
! public boolean accept(final File dirf, final String name) {
return name.endsWith(".id");
}
};
! final File[] xmlfiles = dir.listFiles(filter);
System.out.println("There are " + xmlfiles.length + " files in the directory");
for (int i = 0; i < xmlfiles.length; i++) {
! final File xmlfile = xmlfiles[i];
System.out.print("Testing file: " + xmlfile.getName() + "... ");
try {
! final SignedNamedObject obj = reader.read(new FileInputStream(xmlfile));
System.out.println("Name : " + obj.getName() + " VERIFIED");
assertTrue(wantValid);
***************
*** 121,125 ****
}
! VerifyingReader reader;
}
--- 127,131 ----
}
! final VerifyingReader reader;
}
|