|
From: <pe...@us...> - 2003-11-21 04:45:25
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/test/org/neuclear/store
Modified Files:
AbstractStoreTest.java EncryptedFileStoreTest.java
FileStoreTest.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: AbstractStoreTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store/AbstractStoreTest.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** AbstractStoreTest.java 19 Nov 2003 23:34:00 -0000 1.13
--- AbstractStoreTest.java 21 Nov 2003 04:45:17 -0000 1.14
***************
*** 2,5 ****
--- 2,11 ----
$Id$
$Log$
+ Revision 1.14 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.13 2003/11/19 23:34:00 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 159,163 ****
*/
public abstract class AbstractStoreTest extends AbstractSigningTest {
! public AbstractStoreTest(String name) throws GeneralSecurityException, NeuClearException {
super(name);
store = getStoreInstance();
--- 165,169 ----
*/
public abstract class AbstractStoreTest extends AbstractSigningTest {
! public AbstractStoreTest(final String name) throws GeneralSecurityException, NeuClearException {
super(name);
store = getStoreInstance();
***************
*** 170,194 ****
! protected void tearDown() {
store = null;
}
! public void testStore() throws NeuClearException, InvalidNamedObject, XMLException {
System.out.println("\nTesting " + this.getClass().getName());
System.out.println("Storing " + bobName);
! IdentityBuilder bob = new IdentityBuilder(bobName, signer.getPublicKey(bobName));
store.receive(bob.sign(signer));
System.out.println("Storing " + aliceName);
! IdentityBuilder alice = new IdentityBuilder(aliceName, signer.getPublicKey(aliceName));
store.receive(alice.sign(signer));
System.out.println("Fetching " + bobName);
! SignedNamedObject nobj2 = store.fetch(bobName);
assertNotNull(nobj2);
assertEquals(bobName, nobj2.getName());
System.out.println("Fetching " + aliceName);
! SignedNamedObject nobj4 = store.fetch(aliceName);
assertEquals(aliceName, nobj4.getName());
}
--- 176,200 ----
! protected final void tearDown() {
store = null;
}
! public final void testStore() throws NeuClearException, InvalidNamedObject, XMLException {
System.out.println("\nTesting " + this.getClass().getName());
System.out.println("Storing " + bobName);
! final IdentityBuilder bob = new IdentityBuilder(bobName, signer.getPublicKey(bobName));
store.receive(bob.sign(signer));
System.out.println("Storing " + aliceName);
! final IdentityBuilder alice = new IdentityBuilder(aliceName, signer.getPublicKey(aliceName));
store.receive(alice.sign(signer));
System.out.println("Fetching " + bobName);
! final SignedNamedObject nobj2 = store.fetch(bobName);
assertNotNull(nobj2);
assertEquals(bobName, nobj2.getName());
System.out.println("Fetching " + aliceName);
! final SignedNamedObject nobj4 = store.fetch(aliceName);
assertEquals(aliceName, nobj4.getName());
}
Index: EncryptedFileStoreTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store/EncryptedFileStoreTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** EncryptedFileStoreTest.java 18 Nov 2003 15:07:37 -0000 1.4
--- EncryptedFileStoreTest.java 21 Nov 2003 04:45:18 -0000 1.5
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.5 2003/11/21 04:45:18 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.4 2003/11/18 15:07:37 pelle
* Changes to JCE Implementation
***************
*** 54,59 ****
import java.security.GeneralSecurityException;
! public class EncryptedFileStoreTest extends AbstractStoreTest {
! public EncryptedFileStoreTest(String name) throws GeneralSecurityException, NeuClearException {
super(name);
}
--- 60,65 ----
import java.security.GeneralSecurityException;
! public final class EncryptedFileStoreTest extends AbstractStoreTest {
! public EncryptedFileStoreTest(final String name) throws GeneralSecurityException, NeuClearException {
super(name);
}
***************
*** 61,65 ****
/**
*/
! public Store getStoreInstance() {
return new EncryptedFileStore("target/testdata/efs");
}
--- 67,71 ----
/**
*/
! public final Store getStoreInstance() {
return new EncryptedFileStore("target/testdata/efs");
}
Index: FileStoreTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store/FileStoreTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FileStoreTest.java 18 Nov 2003 15:07:37 -0000 1.4
--- FileStoreTest.java 21 Nov 2003 04:45:18 -0000 1.5
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.5 2003/11/21 04:45:18 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.4 2003/11/18 15:07:37 pelle
* Changes to JCE Implementation
***************
*** 57,62 ****
import java.security.GeneralSecurityException;
! public class FileStoreTest extends AbstractStoreTest {
! public FileStoreTest(String name) throws GeneralSecurityException, NeuClearException {
super(name);
}
--- 63,68 ----
import java.security.GeneralSecurityException;
! public final class FileStoreTest extends AbstractStoreTest {
! public FileStoreTest(final String name) throws GeneralSecurityException, NeuClearException {
super(name);
}
***************
*** 64,68 ****
/**
*/
! public Store getStoreInstance() {
return new FileStore("target/testdata/filestore");
}
--- 70,74 ----
/**
*/
! public final Store getStoreInstance() {
return new FileStore("target/testdata/filestore");
}
|