Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/test/org/neuclear/id/builders
Modified Files:
AuthenticationBuilderTest.java IdentityBuilderTest.java
SigningRequestBuilderTest.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: AuthenticationBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/AuthenticationBuilderTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AuthenticationBuilderTest.java 19 Nov 2003 23:34:00 -0000 1.2
--- AuthenticationBuilderTest.java 21 Nov 2003 04:45:16 -0000 1.3
***************
*** 29,32 ****
--- 29,38 ----
$Id$
$Log$
+ Revision 1.3 2003/11/21 04:45:16 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.2 2003/11/19 23:34:00 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 49,62 ****
* Time: 3:28:05 PM
*/
! public class AuthenticationBuilderTest extends AbstractSigningTest {
! public AuthenticationBuilderTest(String string) throws NeuClearException, GeneralSecurityException {
super(string);
}
! public void testAuthenticate() throws NeuClearException, XMLException {
! AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder("neu://bob@test", "neu://test", "http://users.neuclear.org:8080");
assertEquals(authreq.getParent().getName(), "neu://bob@test");
try {
! AuthenticationTicket auth = (AuthenticationTicket) authreq.sign(signer);
assertTrue(authreq.isSigned());
assertEquals(auth.getName(), authreq.getName());
--- 55,68 ----
* Time: 3:28:05 PM
*/
! public final class AuthenticationBuilderTest extends AbstractSigningTest {
! public AuthenticationBuilderTest(final String string) throws NeuClearException, GeneralSecurityException {
super(string);
}
! public final void testAuthenticate() throws NeuClearException, XMLException {
! final AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder("neu://bob@test", "neu://test", "http://users.neuclear.org:8080");
assertEquals(authreq.getParent().getName(), "neu://bob@test");
try {
! final AuthenticationTicket auth = (AuthenticationTicket) authreq.sign(signer);
assertTrue(authreq.isSigned());
assertEquals(auth.getName(), authreq.getName());
Index: IdentityBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/IdentityBuilderTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** IdentityBuilderTest.java 19 Nov 2003 23:34:00 -0000 1.6
--- IdentityBuilderTest.java 21 Nov 2003 04:45:17 -0000 1.7
***************
*** 35,38 ****
--- 35,44 ----
$Id$
$Log$
+ Revision 1.7 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.6 2003/11/19 23:34:00 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 69,81 ****
* Time: 5:33:30 PM
*/
! public class IdentityBuilderTest extends AbstractSigningTest {
! public IdentityBuilderTest(String string) throws GeneralSecurityException, NeuClearException, FileNotFoundException {
super(string);
rootsigner = new DefaultSigner(new GuiDialogAgent());
}
! public void createIdentities(String name) throws NeuClearException, XMLException {
if (getSigner().canSignFor(name)) {
! IdentityBuilder id = new IdentityBuilder(
name,
((PublicKeySource) getSigner()).getPublicKey(name),
--- 75,87 ----
* Time: 5:33:30 PM
*/
! public final class IdentityBuilderTest extends AbstractSigningTest {
! public IdentityBuilderTest(final String string) throws GeneralSecurityException, NeuClearException, FileNotFoundException {
super(string);
rootsigner = new DefaultSigner(new GuiDialogAgent());
}
! public final void createIdentities(final String name) throws NeuClearException, XMLException {
if (getSigner().canSignFor(name)) {
! final IdentityBuilder id = new IdentityBuilder(
name,
((PublicKeySource) getSigner()).getPublicKey(name),
***************
*** 86,90 ****
final String parent = NSTools.getParentNSURI(id.getName());
! SignedNamedObject sec = null;
if (getSigner().canSignFor(parent)) {
id.sign(getSigner());
--- 92,96 ----
final String parent = NSTools.getParentNSURI(id.getName());
! final SignedNamedObject sec = null;
if (getSigner().canSignFor(parent)) {
id.sign(getSigner());
***************
*** 93,97 ****
}
assertNotNull(sec);
! File file = new File(PATH + NSTools.url2path(id.getName()) + "/root.id");
file.getParentFile().mkdirs();
System.out.println("Wrote: " + file.getAbsolutePath());
--- 99,103 ----
}
assertNotNull(sec);
! final File file = new File(PATH + NSTools.url2path(id.getName()) + "/root.id");
file.getParentFile().mkdirs();
System.out.println("Wrote: " + file.getAbsolutePath());
***************
*** 105,109 ****
}
! public void testBuild() throws NeuClearException, XMLException {
// createIdentities("neu://test");
createIdentities("neu://test/bux");
--- 111,115 ----
}
! public final void testBuild() throws NeuClearException, XMLException {
// createIdentities("neu://test");
createIdentities("neu://test/bux");
Index: SigningRequestBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/SigningRequestBuilderTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SigningRequestBuilderTest.java 19 Nov 2003 23:34:00 -0000 1.2
--- SigningRequestBuilderTest.java 21 Nov 2003 04:45:17 -0000 1.3
***************
*** 30,33 ****
--- 30,39 ----
$Id$
$Log$
+ Revision 1.3 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.2 2003/11/19 23:34:00 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 50,71 ****
* Time: 3:28:05 PM
*/
! public class SigningRequestBuilderTest extends AbstractSigningTest {
! public SigningRequestBuilderTest(String string) throws NeuClearException, GeneralSecurityException {
super(string);
}
! public void testSignatureRequest() throws NeuClearException, XMLException {
! AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder("neu://bob@test", "neu://test", "http://users.neuclear.org:8080");
! SignatureRequestBuilder sigreq = new SignatureRequestBuilder("neu://test", "neu://bob@test", authreq, "For testing purposes");
assertEquals(sigreq.getParent().getName(), "neu://test");
try {
! SignatureRequest tosign = (SignatureRequest) sigreq.sign(signer);
assertTrue(sigreq.isSigned());
assertEquals(tosign.getName(), sigreq.getName());
! NamedObjectBuilder auth2 = tosign.getUnsigned();
assertEquals(auth2.getParent().getName(), "neu://bob@test");
! AuthenticationTicket auth = (AuthenticationTicket) auth2.sign(signer);
assertTrue(auth2.isSigned());
assertEquals(auth.getName(), authreq.getName());
--- 56,77 ----
* Time: 3:28:05 PM
*/
! public final class SigningRequestBuilderTest extends AbstractSigningTest {
! public SigningRequestBuilderTest(final String string) throws NeuClearException, GeneralSecurityException {
super(string);
}
! public final void testSignatureRequest() throws NeuClearException, XMLException {
! final AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder("neu://bob@test", "neu://test", "http://users.neuclear.org:8080");
! final SignatureRequestBuilder sigreq = new SignatureRequestBuilder("neu://test", "neu://bob@test", authreq, "For testing purposes");
assertEquals(sigreq.getParent().getName(), "neu://test");
try {
! final SignatureRequest tosign = (SignatureRequest) sigreq.sign(signer);
assertTrue(sigreq.isSigned());
assertEquals(tosign.getName(), sigreq.getName());
! final NamedObjectBuilder auth2 = tosign.getUnsigned();
assertEquals(auth2.getParent().getName(), "neu://bob@test");
! final AuthenticationTicket auth = (AuthenticationTicket) auth2.sign(signer);
assertTrue(auth2.isSigned());
assertEquals(auth.getName(), authreq.getName());
|