|
From: <pe...@us...> - 2003-11-21 04:45:26
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/test/org/neuclear/id
Modified Files:
NSToolsTest.java NameSpaceTest.java SignedNamedCoreTest.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: NSToolsTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NSToolsTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** NSToolsTest.java 11 Nov 2003 21:18:46 -0000 1.10
--- NSToolsTest.java 21 Nov 2003 04:45:17 -0000 1.11
***************
*** 2,5 ****
--- 2,11 ----
$Id$
$Log$
+ Revision 1.11 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.10 2003/11/11 21:18:46 pelle
Further vital reshuffling.
***************
*** 106,124 ****
* @author Pelle Braendgaard
*/
! public class NSToolsTest extends TestCase {
! public NSToolsTest(String name) {
super(name);
}
! private static void assertValidName(String name) throws NeuClearException {
assertTrue("Should be valid='" + name + "'", NSTools.isValidName(name));
}
! private static void assertInvalidName(String name) throws NeuClearException {
assertTrue("Should be invalid='" + name + "'", !NSTools.isValidName(name));
}
! public void testValidName() throws NeuClearException {
assertValidName("/");
assertValidName("neu://");
--- 112,130 ----
* @author Pelle Braendgaard
*/
! public final class NSToolsTest extends TestCase {
! public NSToolsTest(final String name) {
super(name);
}
! private static void assertValidName(final String name) throws NeuClearException {
assertTrue("Should be valid='" + name + "'", NSTools.isValidName(name));
}
! private static void assertInvalidName(final String name) throws NeuClearException {
assertTrue("Should be invalid='" + name + "'", !NSTools.isValidName(name));
}
! public final void testValidName() throws NeuClearException {
assertValidName("/");
assertValidName("neu://");
Index: NameSpaceTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NameSpaceTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** NameSpaceTest.java 18 Nov 2003 15:07:37 -0000 1.8
--- NameSpaceTest.java 21 Nov 2003 04:45:17 -0000 1.9
***************
*** 2,5 ****
--- 2,11 ----
$Id$
$Log$
+ Revision 1.9 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.8 2003/11/18 15:07:37 pelle
Changes to JCE Implementation
***************
*** 156,162 ****
* @author Pelle Braendgaard
*/
! public class NameSpaceTest extends TestCase {
! public NameSpaceTest(String string) {
super(string);
CryptoTools.ensureProvider();
--- 162,168 ----
* @author Pelle Braendgaard
*/
! public final class NameSpaceTest extends TestCase {
! public NameSpaceTest(final String string) {
super(string);
CryptoTools.ensureProvider();
***************
*** 184,188 ****
* </ul>
*/
! protected void setUp() throws FileNotFoundException, GeneralSecurityException, IOException {
/*
--- 190,194 ----
* </ul>
*/
! protected final void setUp() throws FileNotFoundException, GeneralSecurityException, IOException {
/*
***************
*** 223,227 ****
! public void testGetRoot() {
assertNotNull(Identity.NEUROOT);
}
--- 229,233 ----
! public final void testGetRoot() {
assertNotNull(Identity.NEUROOT);
}
Index: SignedNamedCoreTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/SignedNamedCoreTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SignedNamedCoreTest.java 20 Nov 2003 23:42:24 -0000 1.1
--- SignedNamedCoreTest.java 21 Nov 2003 04:45:17 -0000 1.2
***************
*** 6,9 ****
--- 6,10 ----
import org.neuclear.commons.crypto.signers.DefaultSigner;
import org.neuclear.commons.crypto.signers.JCESigner;
+ import org.neuclear.commons.crypto.signers.TestCaseSigner;
import org.neuclear.id.builders.AuthenticationTicketBuilder;
import org.neuclear.id.builders.NamedObjectBuilder;
***************
*** 33,36 ****
--- 34,43 ----
$Id$
$Log$
+ Revision 1.2 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.1 2003/11/20 23:42:24 pelle
Getting all the tests to work in id
***************
*** 46,53 ****
* Time: 5:26:22 PM
*/
! public class SignedNamedCoreTest extends TestCase {
! public void testCreateRoot() {
! SignedNamedCore core = SignedNamedCore.createRootCore();
assertNotNull(core);
assertEquals(core.getName(), "neu://");
--- 53,60 ----
* Time: 5:26:22 PM
*/
! public final class SignedNamedCoreTest extends TestCase {
! public final void testCreateRoot() {
! final SignedNamedCore core = SignedNamedCore.createRootCore();
assertNotNull(core);
assertEquals(core.getName(), "neu://");
***************
*** 55,62 ****
}
! public void testRead() throws NeuClearException, GeneralSecurityException, XMLException, FileNotFoundException {
! final String name = "neu://";
! NamedObjectBuilder builder = new AuthenticationTicketBuilder(name, "neu://test", "http://slashdot.org");
! final JCESigner signer = new DefaultSigner(new GuiDialogAgent());
builder.sign(name, signer);
assertTrue(builder.verifySignature(signer.getPublicKey(name)));
--- 62,69 ----
}
! public final void testRead() throws NeuClearException, GeneralSecurityException, XMLException, FileNotFoundException {
! final String name = "neu://bob@test";
! final NamedObjectBuilder builder = new AuthenticationTicketBuilder(name, "neu://test", "http://slashdot.org");
! final JCESigner signer = new TestCaseSigner();
builder.sign(name, signer);
assertTrue(builder.verifySignature(signer.getPublicKey(name)));
***************
*** 64,68 ****
assertTrue(builder.verifySignature(Identity.NEUROOT.getPublicKey()));
try {
! SignedNamedCore core = SignedNamedCore.read(builder.getElement());
assertEquals(core.getSignatory().getName(), name);
} catch (InvalidNamedObject e) {
--- 71,75 ----
assertTrue(builder.verifySignature(Identity.NEUROOT.getPublicKey()));
try {
! final SignedNamedCore core = SignedNamedCore.read(builder.getElement());
assertEquals(core.getSignatory().getName(), name);
} catch (InvalidNamedObject e) {
|