|
From: <pe...@us...> - 2003-10-29 21:16:31
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store
In directory sc8-pr-cvs1:/tmp/cvs-serv29589/src/test/org/neuclear/store
Modified Files:
AbstractStoreTest.java
Log Message:
Refactored the whole signing process. Now we have an interface called Signer which is the old SignerStore.
To use it you pass a byte array and an alias. The sign method then returns the signature.
If a Signer needs a passphrase it uses a PassPhraseAgent to present a dialogue box, read it from a command line etc.
This new Signer pattern allows us to use secure signing hardware such as N-Cipher in the future for server applications as well
as SmartCards for end user applications.
Index: AbstractStoreTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store/AbstractStoreTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** AbstractStoreTest.java 21 Oct 2003 22:31:15 -0000 1.6
--- AbstractStoreTest.java 29 Oct 2003 21:16:28 -0000 1.7
***************
*** 2,5 ****
--- 2,12 ----
$Id$
$Log$
+ Revision 1.7 2003/10/29 21:16:28 pelle
+ Refactored the whole signing process. Now we have an interface called Signer which is the old SignerStore.
+ To use it you pass a byte array and an alias. The sign method then returns the signature.
+ If a Signer needs a passphrase it uses a PassPhraseAgent to present a dialogue box, read it from a command line etc.
+ This new Signer pattern allows us to use secure signing hardware such as N-Cipher in the future for server applications as well
+ as SmartCards for end user applications.
+
Revision 1.6 2003/10/21 22:31:15 pelle
Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense.
***************
*** 110,116 ****
import junit.framework.TestCase;
- import org.neuclear.id.InvalidIdentityException;
- import org.neuclear.id.builders.IdentityBuilder;
import org.neuclear.commons.NeuClearException;
import org.neudist.xml.xmlsec.XMLSecurityException;
--- 117,122 ----
import junit.framework.TestCase;
import org.neuclear.commons.NeuClearException;
+ import org.neuclear.id.InvalidIdentityException;
import org.neudist.xml.xmlsec.XMLSecurityException;
***************
*** 155,167 ****
public void testStore() throws NeuClearException, InvalidIdentityException, XMLSecurityException {
! System.out.println("\nTesting " + this.getClass().getName());
! System.out.println("Storing " + rootName);
! store.receive(new IdentityBuilder(rootName, root.getPrivate(), root.getPublic()));
! System.out.println("Storing " + bobName);
! store.receive(new IdentityBuilder(bobName, root.getPrivate(), bob.getPublic()));
! System.out.println("Storing " + bobAliceName);
! store.receive(new IdentityBuilder(bobAliceName, bob.getPrivate(), alice.getPublic()));
! System.out.println("Storing " + eveName);
! store.receive(new IdentityBuilder(eveName, root.getPrivate(), eve.getPublic()));
/* TODO: To complete this part I need to have a parent testkey in a keystore that is signed by root.
System.out.println("Fetching "+rootName);
--- 161,173 ----
public void testStore() throws NeuClearException, InvalidIdentityException, XMLSecurityException {
! // System.out.println("\nTesting " + this.getClass().getName());
! // System.out.println("Storing " + rootName);
! // store.receive(new IdentityBuilder(rootName, root.getPrivate(), root.getPublic()));
! // System.out.println("Storing " + bobName);
! // store.receive(new IdentityBuilder(bobName, root.getPrivate(), bob.getPublic()));
! // System.out.println("Storing " + bobAliceName);
! // store.receive(new IdentityBuilder(bobAliceName, bob.getPrivate(), alice.getPublic()));
! // System.out.println("Storing " + eveName);
! // store.receive(new IdentityBuilder(eveName, root.getPrivate(), eve.getPublic()));
/* TODO: To complete this part I need to have a parent testkey in a keystore that is signed by root.
System.out.println("Fetching "+rootName);
|