You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(119) |
Oct
(111) |
Nov
(238) |
Dec
(395) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(239) |
Feb
(59) |
Mar
(354) |
Apr
(489) |
May
(23) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(5) |
Jun
(2) |
Jul
|
Aug
|
Sep
(3) |
Oct
(14) |
Nov
(17) |
Dec
(9) |
| 2007 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(7) |
May
(3) |
Jun
(6) |
Jul
(4) |
Aug
(3) |
Sep
(15) |
Oct
(13) |
Nov
(35) |
Dec
(40) |
| 2009 |
Jan
(19) |
Feb
(21) |
Mar
(16) |
Apr
(18) |
May
(36) |
Jun
(20) |
Jul
(32) |
Aug
(11) |
Sep
(3) |
Oct
(2) |
Nov
(2) |
Dec
(13) |
| 2010 |
Jan
(5) |
Feb
(5) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(3) |
| 2012 |
Jan
(3) |
Feb
(3) |
Mar
(1) |
Apr
(4) |
May
(8) |
Jun
(4) |
Jul
(9) |
Aug
(2) |
Sep
(8) |
Oct
(3) |
Nov
(8) |
Dec
(4) |
| 2013 |
Jan
(2) |
Feb
(1) |
Mar
(5) |
Apr
(6) |
May
(10) |
Jun
(5) |
Jul
(6) |
Aug
(7) |
Sep
(5) |
Oct
(2) |
Nov
(4) |
Dec
(4) |
| 2014 |
Jan
(13) |
Feb
(4) |
Mar
(7) |
Apr
(9) |
May
(20) |
Jun
(13) |
Jul
(10) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(2) |
Dec
(2) |
| 2015 |
Jan
(3) |
Feb
(3) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(3) |
Nov
(4) |
Dec
(2) |
| 2017 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <pe...@us...> - 2003-10-25 00:51:48
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/pay/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv9768/src/test/org/neuclear/pay/receiver
Added Files:
CreateTestPayments.java PaymentReceiverTest.java
Log Message:
Added tests to test the PaymentReceiver.
CreateTestPayments is a command line utility to create signed payment requests
--- NEW FILE: CreateTestPayments.java ---
package org.neuclear.pay.receiver;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.neuclear.id.NSTools;
import org.neuclear.id.builders.NamedObjectBuilder;
import org.neuclear.pay.contracts.builders.TransferRequestBuilder;
import org.neuclear.signers.commandline.CommandLineSigner;
import java.io.IOException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
/*
NeuClear Distributed Transaction Clearing Platform
(C) 2003 Pelle Braendgaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: CreateTestPayments.java,v 1.1 2003/10/25 00:46:29 pelle Exp $
$Log: CreateTestPayments.java,v $
Revision 1.1 2003/10/25 00:46:29 pelle
Added tests to test the PaymentReceiver.
CreateTestPayments is a command line utility to create signed payment requests
*/
/**
* User: pelleb
* Date: Oct 24, 2003
* Time: 11:50:47 AM
*/
public class CreateTestPayments extends CommandLineSigner {
public CreateTestPayments(String[] args) throws ParseException, NoSuchAlgorithmException, CertificateException, IOException, KeyStoreException {
super(args);
}
public NamedObjectBuilder build() throws Exception {
String to = cmd.getOptionValue("r");
String asset = cmd.getOptionValue("c");
double amount = Double.parseDouble(cmd.getOptionValue("x"));
String id = NSTools.createUniqueNamedID(alias, to);
return new TransferRequestBuilder(id, asset, to, amount);
}
public static void main(String args[]) {
try {
CreateTestPayments signer = new CreateTestPayments(args);
signer.execute();
} catch (Exception e) {
e.printStackTrace();
}
}
protected String getExtraHelp() {
return "[--asset neu://verax/pay --payee neu://bob@verax --amount 20.00]";
}
protected boolean hasArguments() {
return (cmd.hasOption("a") && cmd.hasOption("c") && cmd.hasOption("r") && cmd.hasOption("x"));
}
protected void getLocalOptions(Options options) {
options.addOption("c", "asset", true, "specify id of asset");
options.addOption("r", "payee", true, "specify id of payee");
options.addOption("x", "amount", true, "specify amount");
}
}
--- NEW FILE: PaymentReceiverTest.java ---
package org.neuclear.pay.receiver;
import org.dom4j.DocumentException;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.configuration.ConfigurationException;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.ledger.LedgerCreationException;
import org.neuclear.ledger.LowlevelLedgerException;
import org.neuclear.pay.PaymentProcessor;
import org.neuclear.pay.contracts.TransferContract;
import org.neuclear.receiver.AbstractReceiverTest;
import org.neuclear.receiver.Receiver;
import org.neudist.xml.XMLException;
/*
NeuClear Distributed Transaction Clearing Platform
(C) 2003 Pelle Braendgaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: PaymentReceiverTest.java,v 1.1 2003/10/25 00:46:29 pelle Exp $
$Log: PaymentReceiverTest.java,v $
Revision 1.1 2003/10/25 00:46:29 pelle
Added tests to test the PaymentReceiver.
CreateTestPayments is a command line utility to create signed payment requests
*/
/**
* User: pelleb
* Date: Oct 24, 2003
* Time: 11:20:31 AM
*/
public class PaymentReceiverTest extends AbstractReceiverTest {
public PaymentReceiverTest(String string) throws LowlevelLedgerException, LedgerCreationException, ConfigurationException {
super(string);
//proc=PaymentProcessor.getInstance();
receiver = new PaymentReceiver(proc, "neu://test/pay");
}
public void testSimple() throws Exception, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/payments");
}
public Receiver getReceiver() {
return receiver;
}
public String getExtension() {
return ".xml";
}
public Object getPreTransactionState(SignedNamedObject obj) throws Exception {
if (obj instanceof TransferContract) {
TransferContract transfer = (TransferContract) obj;
double fromBalance = proc.getAccount(transfer.getSignatory().getName()).getBalance(transfer.getTimeStamp());
double toBalance = proc.getAccount(transfer.getRecipient()).getBalance(transfer.getTimeStamp());
return new double[]{fromBalance, toBalance};
}
return null; //No state to report
}
public boolean verifyTransaction(final SignedNamedObject obj, final Object state) throws Exception {
if (obj instanceof TransferContract && state != null) {
TransferContract transfer = (TransferContract) obj;
final double prebalances[] = (double[]) state;
double fromBalance = proc.getAccount(transfer.getSignatory().getName()).getBalance(transfer.getTimeStamp());
double toBalance = proc.getAccount(transfer.getRecipient()).getBalance(transfer.getTimeStamp());
return (fromBalance == prebalances[0] - transfer.getAmount()) &&
(toBalance == prebalances[1] + transfer.getAmount());
}
return false;
}
private Receiver receiver;
private PaymentProcessor proc;
private double balance = 0.0;
}
|
|
From: <pe...@us...> - 2003-10-25 00:47:56
|
Update of /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet
In directory sc8-pr-cvs1:/tmp/cvs-serv7908/src/java/org/neuclear/bet
Modified Files:
BetProcessor.java
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: BetProcessor.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/BetProcessor.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** BetProcessor.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- BetProcessor.java 25 Oct 2003 00:38:20 -0000 1.2
***************
*** 25,29 ****
* Instantiates the BetProcessor with the required PaymentProcessor to use for
* handling payments.
! * @param pay
*/
public BetProcessor(Totalizer tote, PaymentProcessor pay, String title, String id) {
--- 25,30 ----
* Instantiates the BetProcessor with the required PaymentProcessor to use for
* handling payments.
! *
! * @param pay
*/
public BetProcessor(Totalizer tote, PaymentProcessor pay, String title, String id) {
***************
*** 56,59 ****
--- 57,61 ----
/**
* Process the Bet specified in the BetRequest and returns a Receipt
+ *
* @param req Valid BetRequest
* @return BetReceipt
***************
*** 87,91 ****
public static BetProcessor getInstance() throws ConfigurationException {
! return (BetProcessor) Configuration.getContainer().getComponent(BetProcessor.class);
}
--- 89,93 ----
public static BetProcessor getInstance() throws ConfigurationException {
! return (BetProcessor) Configuration.getContainer(BetProcessor.class).getComponentInstance(BetProcessor.class);
}
***************
*** 104,108 ****
/**
* Notify listener that the specified outcome won.
! * @param winSrc
*/
public void win(EventOutcome winSrc) throws LowlevelLedgerException {
--- 106,111 ----
/**
* Notify listener that the specified outcome won.
! *
! * @param winSrc
*/
public void win(EventOutcome winSrc) throws LowlevelLedgerException {
***************
*** 162,166 ****
/**
* Notify listener that the specified outcome has been cancelled from the event
! * @param outcomeSrc
*/
public void scratch(EventOutcome outcomeSrc) throws LowlevelLedgerException {
--- 165,170 ----
/**
* Notify listener that the specified outcome has been cancelled from the event
! *
! * @param outcomeSrc
*/
public void scratch(EventOutcome outcomeSrc) throws LowlevelLedgerException {
***************
*** 180,184 ****
/**
* Notify listener that the event has been cancelled.
! * @param event
*/
public void cancelEvent(BettingEvent event) throws LowlevelLedgerException {
--- 184,189 ----
/**
* Notify listener that the event has been cancelled.
! *
! * @param event
*/
public void cancelEvent(BettingEvent event) throws LowlevelLedgerException {
|
|
From: <pe...@us...> - 2003-10-25 00:47:53
|
Update of /cvsroot/neuclear/neuclear-bet
In directory sc8-pr-cvs1:/tmp/cvs-serv7908
Modified Files:
project.xml
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: project.xml
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/project.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** project.xml 23 Oct 2003 22:00:40 -0000 1.3
--- project.xml 25 Oct 2003 00:38:20 -0000 1.4
***************
*** 87,91 ****
<dependency>
<id>picocontainer</id>
! <version>1.0-beta-1</version>
</dependency>
<dependency>
--- 87,91 ----
<dependency>
<id>picocontainer</id>
! <version>1.0-beta-2</version>
</dependency>
<dependency>
|
|
From: <pe...@us...> - 2003-10-25 00:47:53
|
Update of /cvsroot/neuclear/neuclear-ledger
In directory sc8-pr-cvs1:/tmp/cvs-serv8013
Modified Files:
project.xml
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: project.xml
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/project.xml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** project.xml 20 Sep 2003 23:16:16 -0000 1.1.1.1
--- project.xml 25 Oct 2003 00:39:05 -0000 1.2
***************
*** 68,72 ****
<dependency>
<id>picocontainer</id>
! <version>1.0-beta-1</version>
</dependency>
<dependency>
--- 68,72 ----
<dependency>
<id>picocontainer</id>
! <version>1.0-beta-2</version>
</dependency>
<dependency>
|
|
From: <pe...@us...> - 2003-10-25 00:46:16
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/pay/contracts
In directory sc8-pr-cvs1:/tmp/cvs-serv7941/src/java/org/neuclear/pay/contracts
Modified Files:
TransferGlobals.java
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: TransferGlobals.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/pay/contracts/TransferGlobals.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TransferGlobals.java 3 Oct 2003 23:48:29 -0000 1.1
--- TransferGlobals.java 25 Oct 2003 00:38:43 -0000 1.2
***************
*** 23,26 ****
--- 23,32 ----
$Id$
$Log$
+ Revision 1.2 2003/10/25 00:38:43 pelle
+ Fixed SmtpSender it now sends the messages.
+ Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
+ is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
+ Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
+
Revision 1.1 2003/10/03 23:48:29 pelle
Did various security related updates in the pay package with regards to immutability of fields etc.
***************
*** 35,39 ****
/**
- *
* User: pelleb
* Date: Oct 3, 2003
--- 41,44 ----
***************
*** 64,67 ****
public static final String XFER_RCPT_TAGNAME = "TransferReceipt";
public static final String XFER_NSPREFIX = "xfer";
! public static final String XFER_NSURI = "http://neudist.org/neu/xfer";
}
--- 69,72 ----
public static final String XFER_RCPT_TAGNAME = "TransferReceipt";
public static final String XFER_NSPREFIX = "xfer";
! public static final String XFER_NSURI = "http://neuclear.org/neu/xfer";
}
|
|
From: <pe...@us...> - 2003-10-25 00:46:05
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/pay/receiver In directory sc8-pr-cvs1:/tmp/cvs-serv8663/src/test/org/neuclear/pay/receiver Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/pay/receiver added to the repository |
|
From: <pe...@us...> - 2003-10-25 00:45:56
|
Update of /cvsroot/neuclear/neuclear-commons
In directory sc8-pr-cvs1:/tmp/cvs-serv8075
Modified Files:
project.xml
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: project.xml
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/project.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** project.xml 26 Sep 2003 23:52:13 -0000 1.2
--- project.xml 25 Oct 2003 00:39:27 -0000 1.3
***************
*** 74,78 ****
<dependency>
<id>picocontainer</id>
! <version>1.0-beta-1</version>
</dependency>
<dependency>
--- 74,78 ----
<dependency>
<id>picocontainer</id>
! <version>1.0-beta-2</version>
</dependency>
<dependency>
|
|
From: <pe...@us...> - 2003-10-25 00:45:48
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/pay/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv7941/src/java/org/neuclear/pay/receiver
Modified Files:
PaymentReceiver.java
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: PaymentReceiver.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/pay/receiver/PaymentReceiver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PaymentReceiver.java 21 Oct 2003 22:29:09 -0000 1.3
--- PaymentReceiver.java 25 Oct 2003 00:38:43 -0000 1.4
***************
*** 2,5 ****
--- 2,6 ----
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.id.verifier.VerifyingReader;
import org.neuclear.ledger.InvalidTransactionException;
import org.neuclear.ledger.LowlevelLedgerException;
***************
*** 8,15 ****
import org.neuclear.pay.*;
import org.neuclear.pay.contracts.TransferContract;
import org.neuclear.pay.contracts.builders.TransferReceiptBuilder;
import org.neuclear.receiver.Receiver;
import org.neuclear.receiver.UnsupportedTransaction;
- import org.neuclear.commons.NeuClearException;
import org.neudist.xml.ElementProxy;
import org.neudist.xml.xmlsec.XMLSecurityException;
--- 9,16 ----
import org.neuclear.pay.*;
import org.neuclear.pay.contracts.TransferContract;
+ import org.neuclear.pay.contracts.TransferGlobals;
import org.neuclear.pay.contracts.builders.TransferReceiptBuilder;
import org.neuclear.receiver.Receiver;
import org.neuclear.receiver.UnsupportedTransaction;
import org.neudist.xml.ElementProxy;
import org.neudist.xml.xmlsec.XMLSecurityException;
***************
*** 38,42 ****
/**
- *
* User: pelleb
* Date: Sep 23, 2003
--- 39,42 ----
***************
*** 53,58 ****
/**
* Add your main transaction processing logic within this method.
! * @param obj
! * @throws UnsupportedTransaction
*/
public final ElementProxy receive(SignedNamedObject obj) throws UnsupportedTransaction {
--- 53,59 ----
/**
* Add your main transaction processing logic within this method.
! *
! * @param obj
! * @throws UnsupportedTransaction
*/
public final ElementProxy receive(SignedNamedObject obj) throws UnsupportedTransaction {
***************
*** 74,79 ****
} catch (LowlevelLedgerException e) {
e.printStackTrace();
- } catch (NeuClearException e) {
- e.printStackTrace();
} catch (InsufficientFundsException e) {
e.printStackTrace();
--- 75,78 ----
***************
*** 96,98 ****
--- 95,102 ----
private final String asset;
private PrivateKey signer;
+
+ {
+ // Registers the readers for transfers
+ VerifyingReader.getInstance().registerReader(TransferGlobals.XFER_TAGNAME, new TransferContract.Reader());
+ }
}
|
|
From: <pe...@us...> - 2003-10-25 00:45:10
|
Update of /cvsroot/neuclear/neuclear-id/src/testdata/simple In directory sc8-pr-cvs1:/tmp/cvs-serv8101/src/testdata/simple Added Files: testatpelle.id Log Message: Fixed SmtpSender it now sends the messages. Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants. Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2 --- NEW FILE: testatpelle.id --- <neuid:Identity xmlns:neuid="http://neudist.org/neu/neuid" neuid:name="neu://test@pelle" neuid:repository="http://repository.neuclear.org" neuid:logger="mailto:pe...@ne..." neuid:signer="http://localhost:11870/signer" neuid:receiver="mailto:pe...@ne..." neuid:timestamp="2003-10-24T15:53:41,397EST"><neuid:allow><ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:KeyValue><ds:DSAKeyValue><ds:P> /X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HXKu/yIgMZndFIAcc= </ds:P><ds:Q> l2BQjxUjC8yykrmCouuEC/BYHPU= </ds:Q><ds:G> 9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSo= </ds:G><ds:Y> ytPZeMrqbmSPQTTNVKpA0859o+hH4Z8A/cLgpgoI1MrwMzUXabpKyt+jalpBpmLSaRMSrS7F9DX1RxR/PDhUDoZx+2icsNM/MoWlaXJXa8C1UgEjONsbWvId1SRDVHxGWl9AuZSZrcb0t9XSrW79DWRMJ5cN8Yvy8Jg8abSa1+U= </ds:Y></ds:DSAKeyValue></ds:KeyValue></ds:KeyInfo></neuid:allow><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue> QssfQvVZJJMBp/ZsrhpahxNXolk= </ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue> M27vRhI8N1nIEPDsI/ufVFQ1Req/cfaLJBvjlUsNRye99JSzk8cGLX4dW1/GjrhyAOzfEozt9B3V1T36UpnLnwnhDF/A2TgJ7w/b+ySC/Ay91fVFIO2pAhlUjuz8vwUlJL99xtPLHXw48Ad13k8XEundE8l0zsvqw7wthHDXJtJsi3VJbNcUnLDy4oAQ/YqYTBoba3g6OCtuhahJGx/7mp46Ljw7ZRxzarE0mWXG0LVOexqD2yVMR8T0DE6Nf5obOyL3lKswX88kRNZ0stcAZGo81D0x7zxBCPP3UD8GlXwdV0PtWuNDRJtbXGaDp2VWmYACEoIaRVs/H9rbK+k2JA== </ds:SignatureValue></ds:Signature></neuid:Identity> |
|
From: <pe...@us...> - 2003-10-25 00:44:23
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/pay
In directory sc8-pr-cvs1:/tmp/cvs-serv7941/src/java/org/neuclear/pay
Modified Files:
PaymentProcessor.java
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: PaymentProcessor.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/pay/PaymentProcessor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PaymentProcessor.java 3 Oct 2003 23:48:30 -0000 1.2
--- PaymentProcessor.java 25 Oct 2003 00:38:43 -0000 1.3
***************
*** 103,108 ****
public static PaymentProcessor getInstance() throws LowlevelLedgerException, LedgerCreationException, ConfigurationException {
! PicoContainer pico = Configuration.getContainer();
! return (PaymentProcessor) pico.getComponent(PaymentProcessor.class);
}
--- 103,108 ----
public static PaymentProcessor getInstance() throws LowlevelLedgerException, LedgerCreationException, ConfigurationException {
! PicoContainer pico = Configuration.getContainer(PaymentProcessor.class);
! return (PaymentProcessor) pico.getComponentInstance(PaymentProcessor.class);
}
|
|
From: <pe...@us...> - 2003-10-25 00:43:08
|
Update of /cvsroot/neuclear/neuclear-commons/src/test/org/neuclear/commons/configuration
In directory sc8-pr-cvs1:/tmp/cvs-serv8075/src/test/org/neuclear/commons/configuration
Modified Files:
ConfigurationTest.java
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: ConfigurationTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/test/org/neuclear/commons/configuration/ConfigurationTest.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** ConfigurationTest.java 20 Sep 2003 23:18:12 -0000 1.1.1.1
--- ConfigurationTest.java 25 Oct 2003 00:39:27 -0000 1.2
***************
*** 2,8 ****
import junit.framework.TestCase;
/**
- *
* User: pelleb
* Date: Aug 18, 2003
--- 2,8 ----
import junit.framework.TestCase;
+ import org.neuclear.commons.sql.ConnectionSource;
/**
* User: pelleb
* Date: Aug 18, 2003
***************
*** 15,19 ****
public void testGetComponent() throws ConfigurationException {
! // assertNotNull(Configuration.getContainer().getComponent(ConnectionSource.class));
}
}
--- 15,19 ----
public void testGetComponent() throws ConfigurationException {
! assertNotNull(Configuration.getContainer(ConnectionSource.class).getComponentInstance(ConnectionSource.class));
}
}
|
|
From: <pe...@us...> - 2003-10-25 00:43:06
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/receiver In directory sc8-pr-cvs1:/tmp/cvs-serv8101/src/test/org/neuclear/receiver Added Files: AbstractReceiverTest.java Log Message: Fixed SmtpSender it now sends the messages. Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants. Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2 --- NEW FILE: AbstractReceiverTest.java --- package org.neuclear.receiver; import junit.framework.TestCase; import org.neuclear.commons.NeuClearException; import org.neuclear.id.InvalidIdentityException; import org.neuclear.id.SignedNamedObject; import org.neuclear.id.verifier.VerifyingReader; import org.neudist.crypto.CryptoTools; import org.neudist.xml.XMLException; import java.io.*; /* NeuClear Distributed Transaction Clearing Platform (C) 2003 Pelle Braendgaard This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA $Id: AbstractReceiverTest.java,v 1.1 2003/10/25 00:39:54 pelle Exp $ $Log: AbstractReceiverTest.java,v $ Revision 1.1 2003/10/25 00:39:54 pelle Fixed SmtpSender it now sends the messages. Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants. Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2 */ /** * User: pelleb * Date: Oct 24, 2003 * Time: 11:09:16 AM */ public abstract class AbstractReceiverTest extends TestCase { protected AbstractReceiverTest(String string) { super(string); CryptoTools.ensureProvider(); reader = VerifyingReader.getInstance(); } /** * The receiver to test. This would probably be initialized by the constructor * of the implementing class. * * @return */ public abstract Receiver getReceiver(); /** * The extension of files to verify, eg. ".xml" * * @return */ public abstract String getExtension(); /** * Verify the effect of the transaction based on the given state. * * @param obj The Transaction Object to test * @param state An object created first from the matching getPreTransactionState() method. * @return */ public abstract boolean verifyTransaction(SignedNamedObject obj, Object state) throws Exception; /** * Should return an object identifying the state of the system prior to the transaction. * The object should be meaningful to the matching verifyTransaction method. * * @param obj * @return * @throws Exception */ public abstract Object getPreTransactionState(SignedNamedObject obj) throws Exception; public void runDirectoryTest(String path) throws Exception, IOException, FileNotFoundException, NeuClearException, XMLException { File dir = new File(path); if (!dir.exists()) { System.out.println("Doesnt exist"); return; } FilenameFilter filter; filter = new FilenameFilter() { public boolean accept(File dirf, String name) { return name.endsWith(getExtension()); } }; File xmlfiles[] = dir.listFiles(filter); System.out.println("There are " + xmlfiles.length + " files in the directory"); for (int i = 0; i < xmlfiles.length; i++) { File xmlfile = xmlfiles[i]; System.out.print("Testing file: " + xmlfile.getName() + "... "); try { SignedNamedObject obj = reader.read(new FileInputStream(xmlfile)); System.out.println("Receiving name : " + obj.getName()); Object prestate = getPreTransactionState(obj); getReceiver().receive(obj); assertTrue(verifyTransaction(obj, prestate)); } catch (InvalidIdentityException e) { System.out.println("INVALID " + e.getMessage()); assertTrue(false); } } } private VerifyingReader reader; } |
|
From: <pe...@us...> - 2003-10-25 00:42:58
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline In directory sc8-pr-cvs1:/tmp/cvs-serv8101/src/java/org/neuclear/signers/commandline Modified Files: CommandLineSigner.java Added Files: IdentityCreator.java Log Message: Fixed SmtpSender it now sends the messages. Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants. Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2 --- NEW FILE: IdentityCreator.java --- /* $Id: IdentityCreator.java,v 1.1 2003/10/25 00:39:54 pelle Exp $ * $Log: IdentityCreator.java,v $ * Revision 1.1 2003/10/25 00:39:54 pelle * Fixed SmtpSender it now sends the messages. * Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator * is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants. * Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2 * * Revision 1.7 2003/10/21 22:31:13 pelle * Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense. * Unhooked the XMLException in the xmlsig library from NeuClearException to make all of its exceptions an independent hierarchy. * Obviously had to perform many changes throughout the code to support these changes. * * Revision 1.6 2003/10/01 19:08:31 pelle * Changed XML Format. Now NameSpace has been modified to Identity also the * xml namespace prefix nsdl has been changed to neuid. * The standard constants for using these have been moved into NSTools. * The NamedObjectBuilder can also now take an Element, such as an unsigned template. * * Revision 1.5 2003/09/26 00:22:07 pelle * Cleanups and final changes to code for refactoring of the Verifier and Reader part. * * Revision 1.4 2003/09/24 23:56:48 pelle * Refactoring nearly done. New model for creating signed objects. * With view for supporting the xmlpull api shortly for performance reasons. * Currently still uses dom4j but that has been refactored out that it * should now be very quick to implement a xmlpull implementation. * * A side benefit of this is that the API has been further simplified. I still have some work * todo with regards to cleaning up some of the outlying parts of the code. * * Revision 1.3 2003/09/23 19:16:28 pelle * Changed NameSpace to Identity. * To cause less confusion in the future. * * Revision 1.2 2003/09/22 19:24:02 pelle * More fixes throughout to problems caused by renaming. * * Revision 1.1.1.1 2003/09/19 14:41:31 pelle * First import into the neuclear project. This was originally under the SF neudist * project. This marks a general major refactoring and renaming ahead. * * The new name for this code is NeuClear Identity and has the general package header of * org.neuclear.id * There are other areas within the current code which will be split out into other subprojects later on. * In particularly the signers will be completely seperated out as well as the contract types. * * * Revision 1.13 2003/02/18 14:57:21 pelle * Finished Cleaning up Receivers and Stores. * Also updated nsdl.xsd xml schema with latest changes. * The whole API is now very simple. * * Revision 1.12 2003/02/18 00:06:15 pelle * Moved the SignerStore's into xml-sig * * Revision 1.11 2003/02/16 00:26:18 pelle * Changed the hardcoded logger default to pick it up from LogSender * * Revision 1.10 2003/02/14 21:10:35 pelle * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger. * The Identity object also has a new method send() which allows one to send a named object to the Identity's * default receiver. * * Revision 1.9 2003/02/14 05:10:13 pelle * New Source model is implemented. * It doesnt quite verify things correctly yet. I'm not yet sure why. * CommandLineSigner is simplified to make it easier to use. * * Revision 1.8 2003/02/10 22:30:14 pelle * Got rid of even further dependencies. In Particular OSCore * * Revision 1.7 2003/02/09 00:15:55 pelle * Fixed things so they now compile with r_0.7 of XMLSig * * Revision 1.6 2002/12/17 21:40:58 pelle * First part of refactoring of SignedNamedObject and SignedObject Interface/Class parings. * * Revision 1.5 2002/12/17 20:34:41 pelle * Lots of changes to core functionality. * First of all I've refactored most of the Resolving and verification code. I have a few more things to do * on it before I'm happy. * There is now a NSResolver class, which handles all the namespace resolution. I took most of the functionality * for this out of SignedNamedObject. * Then there is the veriifer, which verifies a given SignedNamedObject using the NSResolver. * This has simplified the SignedNamedObject classes drastically, leaving them as mainly data objects, which is what they * should be. * I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate. * NSCache now operates using http://www.waterken.com's fantastic ADT collections library. * Something important has been added, which is a SignRequest named object. This signed object, embeds an unsigned * named object for signing by an end users' signing service. * Now were almost ready to start seriously implementing AssetIssuers and Transfers, which will be the most important * part of the framework. * * Revision 1.4 2002/10/10 21:29:25 pelle * Oops. XML-Signature's SignedInfo element I had coded as SignatureInfo * As I thought Canonicalisation doesnt seem to be standard. * Updated the SignedServlet to default to using ~/.neuclear/signers.ks * * Revision 1.3 2002/10/06 00:39:29 pelle * I have now expanded support for different types of Signers. * There is now a JCESignerStore which uses a JCE KeyStore for signing. * I have refactored the SigningServlet a bit, eliminating most of the demo code. * This has been moved into DemoSigningServlet. * I have expanded the CommandLineSigner, so it now also has an option for specifying a default signing service. * The default web application now contains two signers. * - The Demo one is still at /Signer * - There is a new one at /personal/Signer this uses the testkeys.ks for * signing anything under neu://test * Note neu://test now has a default interactive signer running on localhost. * So to play with this you must install the webapp on your own local machine. * * Revision 1.2 2002/10/02 21:03:45 pelle * Major Commit * I completely redid the namespace resolving code. * It now works correctly with the new store attribute of the namespace * And can correctly work out the location of a namespace file * by hierarchically signing it. * I have also included several top level namespaces and finalised * the root namespace. * In short all of the above means that we can theoretically call * Neubia live now. (Well on my first deployment anyway). * There is a new CommandLineSigner utility class which creates and signs * namespaces using standard java keystores. * I'm now working on updating the documentation, so other people * than me might have a chance at using it. * * Revision 1.1 2002/09/29 00:22:09 pelle * Several cosmetic changes. * First attempt at a new CommandLine tool for signing and creating namespace files. * This will be used by people to create requests for namespaces. * */ package org.neuclear.signers.commandline; import org.apache.commons.cli.Options; import org.neuclear.id.NSTools; import org.neuclear.id.builders.IdentityBuilder; import org.neuclear.id.builders.NamedObjectBuilder; import org.neuclear.id.resolver.NSResolver; import org.neuclear.senders.LogSender; import org.neudist.utils.Utility; import java.security.PublicKey; import java.security.cert.Certificate; /** * @author pelleb * @version $Revision: 1.1 $ */ public class IdentityCreator extends CommandLineSigner { public IdentityCreator(String args[]) throws Exception { super(args); identity = cmd.getOptionValue("n"); of = Utility.denullString(of, "." + NSTools.url2path(identity) + "/root.id"); alias = Utility.denullString(alias, NSTools.getParentNSURI(identity)); } public NamedObjectBuilder build() throws Exception { String allow = Utility.denullString(cmd.getOptionValue("w"), identity); String defaultstore = Utility.denullString(cmd.getOptionValue("r"), NSResolver.NSROOTSTORE); String defaultsigner = Utility.denullString(cmd.getOptionValue("i"), "http://localhost:11870/signer"); String defaultlogger = Utility.denullString(cmd.getOptionValue("l"), LogSender.LOGGER); String defaultreceiver = cmd.getOptionValue("b"); PublicKey newkid; if (!Utility.isEmpty(allow)) { Certificate cert = ks.getCertificate(allow); if (cert == null) { System.err.println("PublicKey: " + allow + " doesnt exist in key store"); System.exit(1); } newkid = cert.getPublicKey(); } else newkid = ks.getCertificate(alias).getPublicKey(); //Self Sign return new IdentityBuilder(identity, newkid, defaultstore, defaultsigner, defaultlogger, defaultreceiver); } public static void main(String args[]) { try { IdentityCreator signer = new IdentityCreator(args); signer.execute(); } catch (Exception e) { e.printStackTrace(); } } protected String getExtraHelp() { return "[--name neu://neu/one --allow neuone]"; } protected boolean hasArguments() { return (cmd.hasOption("n") && cmd.hasOption("b")); } protected void getLocalOptions(Options options) { options.addOption("n", "name", true, "specify name of new Identity"); options.addOption("w", "allow", true, "specify alias of owner of new namespace"); options.addOption("r", "defaultrepository", true, "Identity's default Repository"); options.addOption("i", "defaultsigner", true, "Identity's default Interactive Signer"); options.addOption("l", "defaultlogger", true, "Identity's default Logging Service"); options.addOption("b", "defaultreceiver", true, "Identity's default Receiver"); } private String identity; } Index: CommandLineSigner.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline/CommandLineSigner.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CommandLineSigner.java 21 Oct 2003 22:31:13 -0000 1.7 --- CommandLineSigner.java 25 Oct 2003 00:39:54 -0000 1.8 *************** *** 1,4 **** --- 1,10 ---- /* $Id$ * $Log$ + * Revision 1.8 2003/10/25 00:39:54 pelle + * Fixed SmtpSender it now sends the messages. + * Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator + * is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants. + * Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2 + * * Revision 1.7 2003/10/21 22:31:13 pelle * Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense. *************** *** 131,229 **** import org.apache.commons.cli.*; import org.dom4j.Document; - import org.neuclear.id.NSTools; import org.neuclear.id.SignedNamedObject; - import org.neuclear.id.builders.IdentityBuilder; import org.neuclear.id.builders.NamedObjectBuilder; - import org.neuclear.id.resolver.NSResolver; - import org.neuclear.senders.LogSender; import org.neudist.crypto.CryptoTools; - import org.neuclear.commons.NeuClearException; import org.neudist.utils.Utility; - import org.neudist.xml.XMLTools; import org.neudist.xml.XMLException; import java.io.*; ! import java.security.KeyPair; ! import java.security.KeyStore; ! import java.security.PrivateKey; ! import java.security.PublicKey; ! import java.security.cert.Certificate; /** * @author pelleb * @version $Revision$ ! **/ public class CommandLineSigner { ! ! public static void main(String args[]) { CryptoTools.ensureProvider(); - String keystore = System.getProperty("user.home") + "/.keystore"; try { ! //System.setProperty("org.apache.commons.cli.parser","org.apache.commons.cli.PosixParser"); ! Options options = createOptions(); ! CommandLineParser clparser = CommandLineParserFactory.newParser(); ! CommandLine cmd = clparser.parse(options, args); ! boolean doSign = (cmd.hasOption("a")); ! boolean doCreate = (cmd.hasOption("n") && cmd.hasOption("b")); ! if ( ! !(doSign || ! doCreate) ! ) { ! HelpFormatter help = new HelpFormatter(); ! help.printHelp("java org.neuclear.signer.commandline.CommandLineSigner --keystorepassword kspassword [--alias alias --password password] [--name neu://neu/one --allow neuone]", options); ! System.exit(1); ! } ! String ksf = cmd.getOptionValue("s"); ! String kstype = cmd.getOptionValue("t"); ! String kspassword = cmd.getOptionValue("j"); ! String sf = cmd.getOptionValue("i"); ! String password = Utility.denullString(cmd.getOptionValue("p"), kspassword); // If we dont specify a password it defaults to ks password ! String namespace = cmd.getOptionValue("n"); ! String alias = Utility.denullString(cmd.getOptionValue("a"), NSTools.getParentNSURI(namespace)); ! String allow = Utility.denullString(cmd.getOptionValue("w"), namespace); ! String of = Utility.denullString(cmd.getOptionValue("o"), "." + NSTools.url2path(namespace) + "/root.id"); ! doSign = !Utility.isEmpty(alias); ! String defaultstore = Utility.denullString(cmd.getOptionValue("r"), NSResolver.NSROOTSTORE); ! String defaultsigner = Utility.denullString(cmd.getOptionValue("i"), "http://localhost:11870/signer"); ! String defaultlogger = Utility.denullString(cmd.getOptionValue("l"), LogSender.LOGGER); ! String defaultreceiver = cmd.getOptionValue("b"); ! File keystoreFile = new File(Utility.denullString(ksf, keystore)); ! KeyStore ks = KeyStore.getInstance(Utility.denullString(kstype, KeyStore.getDefaultType())); ! ks.load(new FileInputStream(keystoreFile), Utility.denullString(kspassword).toCharArray()); ! KeyPair kp = CryptoTools.getKeyPair(ks, alias, password.toCharArray()); - if (doSign) { if (kp == null) { System.err.println("Key with alias: " + alias + " doesnt exist"); System.exit(1); } - } - NamedObjectBuilder subject; - if (!doCreate) { - subject = loadNamedObject(sf); - } else { - PublicKey newkid; - if (!Utility.isEmpty(allow)) { - Certificate cert = ks.getCertificate(allow); - if (cert == null) { - System.err.println("PublicKey: " + allow + " doesnt exist in key store"); - System.exit(1); - } - newkid = cert.getPublicKey(); - } else - newkid = ks.getCertificate(alias).getPublicKey(); //Self Sign - subject = new IdentityBuilder(namespace, newkid, defaultstore, defaultsigner, defaultlogger, defaultreceiver); - - } - - if (doSign) { PrivateKey key = kp.getPrivate(); --- 137,211 ---- import org.apache.commons.cli.*; import org.dom4j.Document; import org.neuclear.id.SignedNamedObject; import org.neuclear.id.builders.NamedObjectBuilder; import org.neudist.crypto.CryptoTools; import org.neudist.utils.Utility; import org.neudist.xml.XMLException; + import org.neudist.xml.XMLTools; import java.io.*; ! import java.security.*; ! import java.security.cert.CertificateException; /** * @author pelleb * @version $Revision$ ! */ public class CommandLineSigner { ! public CommandLineSigner(String args[]) throws ParseException, NoSuchAlgorithmException, CertificateException, IOException, KeyStoreException { CryptoTools.ensureProvider(); + options = createOptions(); + CommandLineParser clparser = CommandLineParserFactory.newParser(); + + cmd = clparser.parse(options, args); + checkArguments(); + ks = loadKeyStore(); + alias = cmd.getOptionValue("a"); + of = cmd.getOptionValue("o"); + } + public static void main(String args[]) { try { ! CommandLineSigner signer = new CommandLineSigner(args); ! signer.execute(); ! } catch (Exception e) { ! e.printStackTrace(); ! } ! } ! public void checkArguments() { ! if (!hasArguments()) { ! HelpFormatter help = new HelpFormatter(); ! help.printHelp("java " + ! this.getClass().getName() + ! " --keystorepassword kspassword [--alias alias --password password] " + ! getExtraHelp(), options); ! System.exit(1); ! } ! } ! protected String getExtraHelp() { ! return ""; ! } ! protected boolean hasArguments() { ! return cmd.hasOption("a"); ! } + public void execute() { ! try { ! NamedObjectBuilder subject = build(); ! if (!Utility.isEmpty(alias)) { ! String password = Utility.denullString(cmd.getOptionValue("p"), cmd.getOptionValue("j")); // If we dont specify a password it defaults to ks password ! ! KeyPair kp = CryptoTools.getKeyPair(ks, alias, password.toCharArray()); if (kp == null) { System.err.println("Key with alias: " + alias + " doesnt exist"); System.exit(1); } PrivateKey key = kp.getPrivate(); *************** *** 254,268 **** } ! private static NamedObjectBuilder loadNamedObject(String sf) throws FileNotFoundException, XMLException { ! SignedNamedObject subject; ! InputStream source = System.in; ! if (!Utility.isEmpty(sf)) { ! source = new FileInputStream(sf); } ! Document doc = XMLTools.loadDocument(source); ! return new NamedObjectBuilder(doc); } ! private static Options createOptions() { // create Options object Options options = new Options(); --- 236,270 ---- } ! private KeyStore loadKeyStore() throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException { ! String ksf = cmd.getOptionValue("s"); ! String kstype = cmd.getOptionValue("t"); ! String kspassword = cmd.getOptionValue("j"); ! File keystoreFile = new File(Utility.denullString(ksf, keystore)); ! KeyStore ks = KeyStore.getInstance(Utility.denullString(kstype, KeyStore.getDefaultType())); ! ks.load(new FileInputStream(keystoreFile), Utility.denullString(kspassword).toCharArray()); ! return ks; ! } ! ! protected NamedObjectBuilder build() throws Exception { ! String sf = cmd.getOptionValue("i"); ! try { ! SignedNamedObject subject; ! InputStream source = System.in; ! if (!Utility.isEmpty(sf)) { ! source = new FileInputStream(sf); ! } ! Document doc = XMLTools.loadDocument(source); ! return new NamedObjectBuilder(doc); ! } catch (FileNotFoundException e) { ! System.err.println("Couldnt find file: " + sf); ! System.exit(1); ! } catch (XMLException e) { ! System.err.println("Error parsing file: " + sf + "\n" + e.getLocalizedMessage()); ! System.exit(1); } ! return null; } ! private Options createOptions() { // create Options object Options options = new Options(); *************** *** 274,285 **** options.addOption("a", "alias", true, "specify Key Alias in KeyStore"); options.addOption("p", "password", true, "specify Alias Password"); - options.addOption("i", "inputfile", true, "specify Input File"); options.addOption("o", "outputfile", true, "specify Output File"); ! options.addOption("n", "name", true, "specify name of new object"); ! options.addOption("w", "allow", true, "specify alias of owner of new namespace"); ! options.addOption("r", "defaultrepository", true, "Identity's default Repository"); ! options.addOption("i", "defaultsigner", true, "Identity's default Interactive Signer"); ! options.addOption("l", "defaultlogger", true, "Identity's default Logging Service"); ! options.addOption("b", "defaultreceiver", true, "Identity's default Receiver"); --- 276,282 ---- options.addOption("a", "alias", true, "specify Key Alias in KeyStore"); options.addOption("p", "password", true, "specify Alias Password"); options.addOption("o", "outputfile", true, "specify Output File"); ! ! getLocalOptions(options); *************** *** 287,289 **** --- 284,296 ---- } + protected void getLocalOptions(Options options) { + options.addOption("i", "inputfile", true, "specify Input File"); + } + + protected CommandLine cmd; + protected Options options; + protected final static String keystore = System.getProperty("user.home") + "/.keystore"; + protected final KeyStore ks; + protected String alias; + protected String of; } |
|
From: <pe...@us...> - 2003-10-25 00:42:58
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv8101/src/java/org/neuclear/id
Modified Files:
Identity.java NSTools.java SignedNamedObject.java
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Identity.java 21 Oct 2003 22:31:12 -0000 1.8
--- Identity.java 25 Oct 2003 00:39:54 -0000 1.9
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.9 2003/10/25 00:39:54 pelle
+ * Fixed SmtpSender it now sends the messages.
+ * Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
+ * is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
+ * Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
+ *
* Revision 1.8 2003/10/21 22:31:12 pelle
* Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense.
***************
*** 181,190 ****
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.neuclear.id.builders.NamedObjectBuilder;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.senders.Sender;
- import org.neudist.crypto.CryptoTools;
import org.neudist.crypto.CryptoException;
! import org.neuclear.commons.NeuClearException;
import org.neudist.utils.Utility;
import org.neudist.xml.xmlsec.KeyInfo;
--- 187,196 ----
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
+ import org.neuclear.commons.NeuClearException;
import org.neuclear.id.builders.NamedObjectBuilder;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.senders.Sender;
import org.neudist.crypto.CryptoException;
! import org.neudist.crypto.CryptoTools;
import org.neudist.utils.Utility;
import org.neudist.xml.xmlsec.KeyInfo;
***************
*** 206,216 ****
/**
! * @param name The Name of Identity
! * @param signatory The Signatory that signed this object
! * @param timestamp The TimeStamp of the SignedNamedObject
* @param repository URL of Default Store for Identity. (Note. A Identity object is stored in the default repository of it's parent namespace)
! * @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing
! * @param receiver URL of default receiver for namespace
! * @throws NeuClearException
*/
--- 212,222 ----
/**
! * @param name The Name of Identity
! * @param signatory The Signatory that signed this object
! * @param timestamp The TimeStamp of the SignedNamedObject
* @param repository URL of Default Store for Identity. (Note. A Identity object is stored in the default repository of it's parent namespace)
! * @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing
! * @param receiver URL of default receiver for namespace
! * @throws NeuClearException
*/
***************
*** 286,290 ****
/**
! * Returns the fixed Root PublicKey
*/
private final static PublicKey getRootPK() throws XMLSecurityException {
--- 292,296 ----
/**
! * Returns the fixed Root PublicKey
*/
private final static PublicKey getRootPK() throws XMLSecurityException {
***************
*** 303,308 ****
* For efficiency purposes we do not store the source material here but instead
* return the URI of the certificate which allows us to regenerate it from source.
! * @return
! * @throws CertificateEncodingException
*/
public byte[] getEncoded() throws CertificateEncodingException {
--- 309,315 ----
* For efficiency purposes we do not store the source material here but instead
* return the URI of the certificate which allows us to regenerate it from source.
! *
! * @return
! * @throws CertificateEncodingException
*/
public byte[] getEncoded() throws CertificateEncodingException {
***************
*** 314,323 ****
* creation process. I just check if the signers key is the same as the given.
* TODO: This almost certainly has bad security implications and needs to be though through
! * @param publicKey
! * @throws CertificateException
! * @throws NoSuchAlgorithmException
! * @throws InvalidKeyException
! * @throws NoSuchProviderException
! * @throws SignatureException
*/
public void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
--- 321,331 ----
* creation process. I just check if the signers key is the same as the given.
* TODO: This almost certainly has bad security implications and needs to be though through
! *
! * @param publicKey
! * @throws CertificateException
! * @throws NoSuchAlgorithmException
! * @throws InvalidKeyException
! * @throws NoSuchProviderException
! * @throws SignatureException
*/
public void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
***************
*** 344,352 ****
/**
* Read object from Element and fill in its details
! * @param elem
! * @return
*/
public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws XMLSecurityException, NeuClearException {
! String repository = elem.attributeValue(DocumentHelper.createQName("store", NSTools.NS_NEUID));
String signer = elem.attributeValue(DocumentHelper.createQName("signer", NSTools.NS_NEUID));
String logger = elem.attributeValue(DocumentHelper.createQName("logger", NSTools.NS_NEUID));
--- 352,361 ----
/**
* Read object from Element and fill in its details
! *
! * @param elem
! * @return
*/
public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws XMLSecurityException, NeuClearException {
! String repository = elem.attributeValue(DocumentHelper.createQName("repository", NSTools.NS_NEUID));
String signer = elem.attributeValue(DocumentHelper.createQName("signer", NSTools.NS_NEUID));
String logger = elem.attributeValue(DocumentHelper.createQName("logger", NSTools.NS_NEUID));
Index: NSTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NSTools.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** NSTools.java 23 Oct 2003 22:02:36 -0000 1.11
--- NSTools.java 25 Oct 2003 00:39:54 -0000 1.12
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.12 2003/10/25 00:39:54 pelle
+ * Fixed SmtpSender it now sends the messages.
+ * Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
+ * is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
+ * Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
+ *
* Revision 1.11 2003/10/23 22:02:36 pelle
* Moved some certificates to live status at http://repository.neuclear.org
***************
*** 208,212 ****
for (int i = offset; i < ticketsrc.length; i++) {
! if (ticketsrc[i] == (byte) '/')
ticketsrc[i] = (byte) '.';
}
--- 214,218 ----
for (int i = offset; i < ticketsrc.length; i++) {
! if (ticketsrc[i] == (byte) '/' || ticketsrc[i] == (byte) '@')
ticketsrc[i] = (byte) '.';
}
***************
*** 241,245 ****
public static final String NEUID_PREFIX = "neuid:";
! private static final String VALID_TOKEN = "[\\w.]+";
private static final String VALID_ID = "^(neu:\\/)?" +
"(\\/(" + VALID_TOKEN + "@" + VALID_TOKEN + ")?" +
--- 247,251 ----
public static final String NEUID_PREFIX = "neuid:";
! private static final String VALID_TOKEN = "[\\w.-]+";
private static final String VALID_ID = "^(neu:\\/)?" +
"(\\/(" + VALID_TOKEN + "@" + VALID_TOKEN + ")?" +
***************
*** 248,252 ****
private static final Pattern VALID = Pattern.compile(VALID_ID);
private static final String STRIP_URI_ARROBA_EX = "^(neu:\\/)?" +
! "\\/(" + VALID_TOKEN + ")@(" + VALID_TOKEN + ")([\\/\\w.]*)$";
private static final Pattern STRIP_URI_ARROBA = Pattern.compile(STRIP_URI_ARROBA_EX);
--- 254,258 ----
private static final Pattern VALID = Pattern.compile(VALID_ID);
private static final String STRIP_URI_ARROBA_EX = "^(neu:\\/)?" +
! "\\/(" + VALID_TOKEN + ")@(" + VALID_TOKEN + ")([\\/\\w.-]*)$";
private static final Pattern STRIP_URI_ARROBA = Pattern.compile(STRIP_URI_ARROBA_EX);
Index: SignedNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedObject.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SignedNamedObject.java 21 Oct 2003 22:31:13 -0000 1.6
--- SignedNamedObject.java 25 Oct 2003 00:39:54 -0000 1.7
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.7 2003/10/25 00:39:54 pelle
+ * Fixed SmtpSender it now sends the messages.
+ * Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
+ * is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
+ * Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
+ *
* Revision 1.6 2003/10/21 22:31:13 pelle
* Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense.
***************
*** 181,184 ****
--- 187,191 ----
/**
* The full name (URI) of an object
+ *
* @return String containing the fully qualified URI of an object
*/
***************
*** 189,192 ****
--- 196,200 ----
/**
* The Name of an object within it's parent Identity
+ *
* @return Parent Name
*/
***************
*** 198,202 ****
! public Timestamp getTimeStamp() throws NeuClearException {
return timestamp;
--- 206,210 ----
! public Timestamp getTimeStamp() {
return timestamp;
***************
*** 205,209 ****
/**
* The Signatory of the current document
! * @return
*/
public Identity getSignatory() {
--- 213,218 ----
/**
* The Signatory of the current document
! *
! * @return
*/
public Identity getSignatory() {
***************
*** 213,217 ****
/**
* The SHA1 Digest of the full XML encoded document
! * @return
*/
public String getDigest() {
--- 222,227 ----
/**
* The SHA1 Digest of the full XML encoded document
! *
! * @return
*/
public String getDigest() {
***************
*** 227,232 ****
/**
* Read object from Element and fill in its details
! * @param elem
! * @return
*/
public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws NeuClearException {
--- 237,243 ----
/**
* Read object from Element and fill in its details
! *
! * @param elem
! * @return
*/
public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws NeuClearException {
|
|
From: <pe...@us...> - 2003-10-25 00:42:58
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders
In directory sc8-pr-cvs1:/tmp/cvs-serv8101/src/java/org/neuclear/senders
Modified Files:
SmtpSender.java
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: SmtpSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/SmtpSender.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** SmtpSender.java 21 Oct 2003 22:31:13 -0000 1.7
--- SmtpSender.java 25 Oct 2003 00:39:54 -0000 1.8
***************
*** 8,11 ****
--- 8,17 ----
* $Id$
* $Log$
+ * Revision 1.8 2003/10/25 00:39:54 pelle
+ * Fixed SmtpSender it now sends the messages.
+ * Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
+ * is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
+ * Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
+ *
* Revision 1.7 2003/10/21 22:31:13 pelle
* Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense.
***************
*** 54,62 ****
*/
- import org.neuclear.id.SignedNamedObject;
- import org.neuclear.id.Named;
- import org.neuclear.id.builders.NamedObjectBuilder;
import org.neuclear.commons.NeuClearException;
import org.neudist.utils.Utility;
import javax.mail.*;
--- 60,67 ----
*/
import org.neuclear.commons.NeuClearException;
+ import org.neuclear.id.builders.NamedObjectBuilder;
import org.neudist.utils.Utility;
+ import org.neudist.xml.XMLException;
import javax.mail.*;
***************
*** 100,104 ****
multi.addBodyPart(body);
BodyPart objpart = new MimeBodyPart();
! //TODO How do we replace this objpart.setText(obj.asXML());
objpart.setHeader("Content-type", "application/nsdl");
multi.addBodyPart(objpart);
--- 105,109 ----
multi.addBodyPart(body);
BodyPart objpart = new MimeBodyPart();
! objpart.setText(obj.asXML());
objpart.setHeader("Content-type", "application/nsdl");
multi.addBodyPart(objpart);
***************
*** 112,115 ****
--- 117,123 ----
} catch (MessagingException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
+ Utility.rethrowException(e);
+ } catch (XMLException e) {
+ e.printStackTrace();
Utility.rethrowException(e);
}
|
|
From: <pe...@us...> - 2003-10-25 00:42:48
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/configuration
In directory sc8-pr-cvs1:/tmp/cvs-serv8075/src/java/org/neuclear/commons/configuration
Modified Files:
Configuration.java
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: Configuration.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/configuration/Configuration.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Configuration.java 20 Sep 2003 23:18:12 -0000 1.1.1.1
--- Configuration.java 25 Oct 2003 00:39:27 -0000 1.2
***************
*** 1,9 ****
package org.neuclear.commons.configuration;
import org.picocontainer.PicoContainer;
- import org.picocontainer.PicoRegistrationException;
import org.picocontainer.PicoInitializationException;
! import org.nanocontainer.InputSourceRegistrationNanoContainer;
! import org.nanocontainer.DomRegistrationNanoContainer;
import org.xml.sax.InputSource;
--- 1,9 ----
package org.neuclear.commons.configuration;
+ import org.nanocontainer.DomRegistrationNanoContainer;
+ import org.nanocontainer.InputSourceRegistrationNanoContainer;
import org.picocontainer.PicoContainer;
import org.picocontainer.PicoInitializationException;
! import org.picocontainer.PicoRegistrationException;
import org.xml.sax.InputSource;
***************
*** 11,15 ****
/**
- *
* User: pelleb
* Date: Aug 13, 2003
--- 11,14 ----
***************
*** 18,32 ****
public class Configuration {
! public static synchronized PicoContainer getContainer() throws ConfigurationException {
! if (pico==null)
! pico=buildContainer();
! return pico;
}
! private static PicoContainer buildContainer()throws ConfigurationException{
try {
InputSourceRegistrationNanoContainer nc = new DomRegistrationNanoContainer.Default();
! nc.registerComponents(new InputSource(Configuration.class.getClassLoader().getResourceAsStream("neuclear-conf.xml")));
! nc.instantiateComponents();
return nc;
} catch (ParserConfigurationException e) {
--- 17,30 ----
public class Configuration {
! public static synchronized PicoContainer getContainer(Class context) throws ConfigurationException {
! if (pico == null)
! pico = buildContainer(context);
! return pico;
}
! private static PicoContainer buildContainer(Class context) throws ConfigurationException {
try {
InputSourceRegistrationNanoContainer nc = new DomRegistrationNanoContainer.Default();
! nc.registerComponents(new InputSource(context.getResourceAsStream("neuclear-conf.xml")));
return nc;
} catch (ParserConfigurationException e) {
***************
*** 35,43 ****
--- 33,46 ----
throw new ConfigurationException(e);
} catch (ClassNotFoundException e) {
+ e.printStackTrace();
throw new ConfigurationException(e);
} catch (PicoInitializationException e) {
throw new ConfigurationException(e);
+ } catch (NoClassDefFoundError e) {
+ e.printStackTrace();
+ throw new ConfigurationException(e);
}
}
+
private static PicoContainer pico;
|
|
From: <pe...@us...> - 2003-10-25 00:42:45
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv8101/src/java/org/neuclear/id/verifier
Modified Files:
VerifyingReader.java
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: VerifyingReader.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier/VerifyingReader.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** VerifyingReader.java 21 Oct 2003 22:31:12 -0000 1.4
--- VerifyingReader.java 25 Oct 2003 00:39:54 -0000 1.5
***************
*** 4,14 ****
import org.dom4j.Element;
import org.dom4j.QName;
import org.neuclear.id.*;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.time.TimeTools;
import org.neudist.crypto.CryptoTools;
- import org.neuclear.commons.NeuClearException;
- import org.neudist.xml.XMLTools;
import org.neudist.xml.XMLException;
import org.neudist.xml.xmlsec.XMLSecTools;
--- 4,14 ----
import org.dom4j.Element;
import org.dom4j.QName;
+ import org.neuclear.commons.NeuClearException;
import org.neuclear.id.*;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.time.TimeTools;
import org.neudist.crypto.CryptoTools;
import org.neudist.xml.XMLException;
+ import org.neudist.xml.XMLTools;
import org.neudist.xml.xmlsec.XMLSecTools;
***************
*** 39,42 ****
--- 39,48 ----
$Id$
$Log$
+ Revision 1.5 2003/10/25 00:39:54 pelle
+ Fixed SmtpSender it now sends the messages.
+ Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
+ is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
+ Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
+
Revision 1.4 2003/10/21 22:31:12 pelle
Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense.
***************
*** 65,69 ****
/**
- *
* User: pelleb
* Date: Sep 23, 2003
--- 71,74 ----
***************
*** 78,82 ****
public static VerifyingReader getInstance() {
! return new VerifyingReader();
}
--- 83,87 ----
public static VerifyingReader getInstance() {
! return instance;
}
***************
*** 84,90 ****
* Read Object from input stream.
* Verify signature with parent Identity
! * @param is
! * @return
! * @throws NeuClearException
*/
public SignedNamedObject read(InputStream is) throws XMLException, NeuClearException {
--- 89,96 ----
* Read Object from input stream.
* Verify signature with parent Identity
! *
! * @param is
! * @return
! * @throws NeuClearException
*/
public SignedNamedObject read(InputStream is) throws XMLException, NeuClearException {
***************
*** 115,119 ****
--- 121,130 ----
}
+ public void registerReader(String name, NamedObjectReader reader) {
+ readers.put(name, reader);
+ }
+
private Map readers;
private NamedObjectReader defaultReader;
+ private static VerifyingReader instance = new VerifyingReader();
}
|
|
From: <pe...@us...> - 2003-10-25 00:41:57
|
Update of /cvsroot/neuclear/neuclear-pay
In directory sc8-pr-cvs1:/tmp/cvs-serv7941
Modified Files:
project.xml
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: project.xml
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/project.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** project.xml 26 Sep 2003 23:51:33 -0000 1.3
--- project.xml 25 Oct 2003 00:38:43 -0000 1.4
***************
*** 79,83 ****
<dependency>
<id>picocontainer</id>
! <version>1.0-beta-1</version>
</dependency>
<dependency>
--- 79,83 ----
<dependency>
<id>picocontainer</id>
! <version>1.0-beta-2</version>
</dependency>
<dependency>
|
|
From: <pe...@us...> - 2003-10-24 18:37:13
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/receiver In directory sc8-pr-cvs1:/tmp/cvs-serv8910/src/test/org/neuclear/receiver Log Message: Directory /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/receiver added to the repository |
|
From: <pe...@us...> - 2003-10-24 18:33:00
|
Update of /cvsroot/neuclear/neuclear-pay/src/testdata In directory sc8-pr-cvs1:/tmp/cvs-serv15139/src/testdata Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/testdata added to the repository |
|
From: <pe...@us...> - 2003-10-24 16:53:31
|
Update of /cvsroot/neuclear/neuclear-pay/src/testdata/payments In directory sc8-pr-cvs1:/tmp/cvs-serv15315/src/testdata/payments Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/testdata/payments added to the repository |
|
From: <pe...@us...> - 2003-10-24 13:25:18
|
Update of /cvsroot/neuclear/neuclear-id/src/testdata/simple In directory sc8-pr-cvs1:/tmp/cvs-serv25582/src/testdata/simple Added Files: verax.id Log Message: Moved some certificates to live status at http://repository.neuclear.org Updated NSTools.url2path to support neuids with @ signs. --- NEW FILE: verax.id --- <neuid:Identity xmlns:neuid="http://neudist.org/neu/neuid" neuid:name="neu://verax" neuid:repository="http://repository.neuclear.org" neuid:logger="mailto:sa...@ve..." neuid:signer="http://localhost:11870/signer" neuid:receiver="mailto:sa...@ve..." neuid:timestamp="2003-10-23T16:23:16,401EST"><neuid:allow><ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:KeyValue><ds:DSAKeyValue><ds:P> /X9TgR11EilS30qcLuzk5/YRt1I870QAwx4/gLZRJmlFXUAiUftZPY1Y+r/F9bow9subVWzXgTuAHTRv8mZgt2uZUKWkn5/oBHsQIsJPu6nX/rfGG/g7V+fGqKYVDwT7g/bTxR7DAjVUE1oWkTL2dfOuK2HXKu/yIgMZndFIAcc= </ds:P><ds:Q> l2BQjxUjC8yykrmCouuEC/BYHPU= </ds:Q><ds:G> 9+GghdabPd7LvKtcNrhXuXmUr7v6OuqC+VdMCz0HgmdRWVeOutRZT+ZxBxCBgLRJFnEj6EwoFhO3zwkyjMim4TwWeotUfI0o4KOuHiuzpnWRbqN/C/ohNWLx+2J6ASQ7zKTxvqhRkImog9/hWuWfBpKLZl6Ae1UlZAFMO/7PSSo= </ds:G><ds:Y> fyFMy6ej2S76gAU/CGpQqUsjsBPeq6okG5cDU1byBVpvWwR81dc7k0t3uZF6tPTE3tqNS0siJnrCt1QAkLjTZFA6lVIOnMwtmD281kC+qwN2V75DkITLf2DWbDaXPxc6K3vP7iQkB2JaQrejB8enMqbtmRQlDcwj018QkMNAFUM= </ds:Y></ds:DSAKeyValue></ds:KeyValue></ds:KeyInfo></neuid:allow><ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference URI=""><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><ds:DigestValue> iXdf3E/cUjoHimcgveNnRoys/LU= </ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue> FgrYatF5R0V/AGPC3ax9G0Dg87yTeubWBQ9EFVjyuX3u0iZk8tEy8Lb8hn1P5x+XM7lgxJmISjRpyNLpBz5O/VQTnvDJ3VdyEGzgBwGt5/GqeIlxqgfYrOTgjNG89ZxOhoG9R+O5Zrcz6dTpZCGFz1Lb4FjMc/qvhHp8f0Xg11abakj115rQVBQh2WdJ+bY+2IXf5WnOjjddp0bBLL/Qg7X/1MRb93zmiwiYfHwTukmfrE7QldosKNq5Jd55Ptdb6G2CwqCSDrfaUKNErwJ3K8qpgMf8xfjq7iR1WHt7KYvXXckbr+RpzediWYFb9iWEEn69oS46iifcym8tYYGYdA== </ds:SignatureValue></ds:Signature></neuid:Identity> |
|
From: <pe...@us...> - 2003-10-24 09:55:28
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver In directory sc8-pr-cvs1:/tmp/cvs-serv25582/src/java/org/neuclear/id/resolver Modified Files: NSResolver.java Log Message: Moved some certificates to live status at http://repository.neuclear.org Updated NSTools.url2path to support neuids with @ signs. Index: NSResolver.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver/NSResolver.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NSResolver.java 21 Oct 2003 22:31:12 -0000 1.7 --- NSResolver.java 23 Oct 2003 22:02:35 -0000 1.8 *************** *** 1,4 **** --- 1,5 ---- package org.neuclear.id.resolver; + import org.neuclear.commons.NeuClearException; import org.neuclear.id.Identity; import org.neuclear.id.InvalidIdentityException; *************** *** 6,10 **** import org.neuclear.id.cache.NSCache; import org.neuclear.source.Source; - import org.neuclear.commons.NeuClearException; /** --- 7,10 ---- *************** *** 20,26 **** * Retrieves the Identity object of the given name * defaultstore for the given namespace. ! * This is guaranteed to be valid as it checks the signatures on each level. ! * @param name ! * @return */ public final static Identity resolveIdentity(String name) throws NeuClearException, InvalidIdentityException { --- 20,27 ---- * Retrieves the Identity object of the given name * defaultstore for the given namespace. ! * This is guaranteed to be valid as it checks the signatures on each level. ! * ! * @param name ! * @return */ public final static Identity resolveIdentity(String name) throws NeuClearException, InvalidIdentityException { *************** *** 31,36 **** String parentname = NSTools.getParentNSURI(name); String store = NSROOTSTORE; ! if (parentname == null || parentname.equals("neu://")) return Identity.NEUROOT; Identity parent = resolveIdentity(parentname); store = parent.getRepository(); --- 32,39 ---- String parentname = NSTools.getParentNSURI(name); String store = NSROOTSTORE; ! ! if (parentname == null || name.equals("neu://")) return Identity.NEUROOT; + Identity parent = resolveIdentity(parentname); store = parent.getRepository(); |
|
From: <pe...@us...> - 2003-10-24 05:16:15
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id In directory sc8-pr-cvs1:/tmp/cvs-serv25582/src/test/org/neuclear/id Modified Files: NSToolsTest.java Log Message: Moved some certificates to live status at http://repository.neuclear.org Updated NSTools.url2path to support neuids with @ signs. Index: NSToolsTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NSToolsTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NSToolsTest.java 22 Oct 2003 23:11:43 -0000 1.7 --- NSToolsTest.java 23 Oct 2003 22:02:36 -0000 1.8 *************** *** 2,5 **** --- 2,9 ---- $Id$ $Log$ + Revision 1.8 2003/10/23 22:02:36 pelle + Moved some certificates to live status at http://repository.neuclear.org + Updated NSTools.url2path to support neuids with @ signs. + Revision 1.7 2003/10/22 23:11:43 pelle Updated the getParentURI method to support the new neu://test@home format. *************** *** 148,151 **** --- 152,168 ---- } + public static void testURL2Path() { + assertEquals("/", NSTools.url2path("neu://")); + assertEquals("/", NSTools.url2path("/")); + assertEquals("/test", NSTools.url2path("neu://test")); + assertEquals("/test", NSTools.url2path("/test")); + assertEquals("/test/@pelle", NSTools.url2path("neu://pelle@test")); + assertEquals("/test/@pelle", NSTools.url2path("/pelle@test")); + assertEquals("/test/@pelle/one", NSTools.url2path("neu://pelle@test/one")); + assertEquals("/test/@pelle/one", NSTools.url2path("/pelle@test/one")); + assertEquals("/test/@pelle/one/two", NSTools.url2path("neu://pelle@test/one/two")); + assertEquals("/test/@pelle/one/two", NSTools.url2path("/pelle@test/one/two")); + + } } |
|
From: <pe...@us...> - 2003-10-24 02:50:28
|
Update of /cvsroot/neuclear/neuclear-bet In directory sc8-pr-cvs1:/tmp/cvs-serv25354 Modified Files: project.xml Log Message: Moved some certificates to live status at http://repository.neuclear.org Updated NSTools.url2path to support neuids with @ signs. Index: project.xml =================================================================== RCS file: /cvsroot/neuclear/neuclear-bet/project.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** project.xml 26 Sep 2003 23:51:11 -0000 1.2 --- project.xml 23 Oct 2003 22:00:40 -0000 1.3 *************** *** 79,82 **** --- 79,87 ---- <version>0.3-SNAPSHOT</version> </dependency> + <dependency> + <id>neuclear-commons</id> + <name>neuclear-commons</name> + <version>0.3-SNAPSHOT</version> + </dependency> <dependency> *************** *** 96,131 **** <version>1.3.2</version> </dependency> ! <!-- <dependency> ! <id>neudistframework</id> ! <name>neudistframework</name> ! <version>0.5</version> ! </dependency> ! <dependency> ! <id>commons-collections</id> ! <name>commons-collections</name> ! <version>2.1</version> ! <jar>commons-collections-2.1.jar</jar> ! <properties> ! <war.bundle.jar>true</war.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>dom4j</id> ! <version>1.3</version> ! <jar>dom4j-1.3.jar</jar> ! <properties> ! <war.bundle.jar>true</war.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>bouncycastle</id> ! <name>bouncycastle</name> ! <version>115</version> ! <jar>jce-jdk13-115.jar</jar> ! <properties> ! <war.bundle.jar>false</war.bundle.jar> ! </properties> ! </dependency> ! --> <dependency> <id>junit</id> --- 101,105 ---- <version>1.3.2</version> </dependency> ! <dependency> <id>junit</id> *************** *** 133,171 **** <version>3.8.1</version> </dependency> - <!-- <dependency> - <id>regexp</id> - <name>regexp</name> - <version>1.2</version> - <properties> - <war.bundle.jar>true</war.bundle.jar> - </properties> - </dependency> - <dependency> - <id>oscore</id> - <name>oscore</name> - <version>2.0.1</version> - <properties> - <war.bundle.jar>true</war.bundle.jar> - </properties> - </dependency> - <dependency> - <id>servletapi</id> - <name>servletapi</name> - <version>2.2</version> - </dependency> - <dependency> - <id>commons-cli</id> - <name>commons-cli</name> - <version>1.0-beta-2</version> - </dependency> - - <dependency> - <id>waterken-adt</id> - <version>2.0-beta13</version> - <properties> - <war.bundle.jar>true</war.bundle.jar> - </properties> - </dependency> - --> </dependencies> <build> --- 107,110 ---- |