|
From: <pe...@us...> - 2003-10-29 21:14:48
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/pay/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv29147/src/test/org/neuclear/pay/receiver
Modified Files:
CreateTestPayments.java PaymentReceiverTest.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: CreateTestPayments.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/pay/receiver/CreateTestPayments.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CreateTestPayments.java 25 Oct 2003 00:46:29 -0000 1.1
--- CreateTestPayments.java 29 Oct 2003 21:14:44 -0000 1.2
***************
*** 3,6 ****
--- 3,7 ----
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
+ import org.neuclear.commons.configuration.ConfigurationException;
import org.neuclear.id.NSTools;
import org.neuclear.id.builders.NamedObjectBuilder;
***************
*** 33,36 ****
--- 34,44 ----
$Id$
$Log$
+ Revision 1.2 2003/10/29 21:14:44 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.1 2003/10/25 00:46:29 pelle
Added tests to test the PaymentReceiver.
***************
*** 45,49 ****
*/
public class CreateTestPayments extends CommandLineSigner {
! public CreateTestPayments(String[] args) throws ParseException, NoSuchAlgorithmException, CertificateException, IOException, KeyStoreException {
super(args);
}
--- 53,57 ----
*/
public class CreateTestPayments extends CommandLineSigner {
! public CreateTestPayments(String[] args) throws ParseException, NoSuchAlgorithmException, CertificateException, IOException, KeyStoreException, ConfigurationException {
super(args);
}
Index: PaymentReceiverTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/pay/receiver/PaymentReceiverTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PaymentReceiverTest.java 28 Oct 2003 23:42:47 -0000 1.2
--- PaymentReceiverTest.java 29 Oct 2003 21:14:45 -0000 1.3
***************
*** 3,6 ****
--- 3,7 ----
import org.dom4j.DocumentException;
import org.neuclear.commons.NeuClearException;
+ import org.neuclear.commons.configuration.Configuration;
import org.neuclear.commons.configuration.ConfigurationException;
import org.neuclear.id.SignedNamedObject;
***************
*** 36,42 ****
$Id$
$Log$
Revision 1.2 2003/10/28 23:42:47 pelle
! The PassPhraseDialogue now works. It simply presents itself as a simple modal dialog box asking for a passphrase.
! The two SignerStore implementations both use it for the passphrase.
Revision 1.1 2003/10/25 00:46:29 pelle
--- 37,50 ----
$Id$
$Log$
+ Revision 1.3 2003/10/29 21:14:45 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.2 2003/10/28 23:42:47 pelle
! The GuiDialogAgent now works. It simply presents itself as a simple modal dialog box asking for a passphrase.
! The two Signer implementations both use it for the passphrase.
Revision 1.1 2003/10/25 00:46:29 pelle
***************
*** 54,59 ****
public PaymentReceiverTest(String string) throws LowlevelLedgerException, LedgerCreationException, ConfigurationException {
super(string);
! proc = PaymentProcessor.getInstance();
! receiver = new PaymentReceiver(proc, "neu://test/pay");
}
--- 62,67 ----
public PaymentReceiverTest(String string) throws LowlevelLedgerException, LedgerCreationException, ConfigurationException {
super(string);
! proc = (PaymentProcessor) Configuration.getComponent(PaymentProcessor.class, "neuclear-pay");
! receiver = (PaymentReceiver) Configuration.getComponent(PaymentReceiver.class, "neuclear-pay");
}
|