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: <bug...@ve...> - 2003-10-01 17:59:04
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://devone.veraxpay.com:9090/secure/ViewIssue.jspa?key=NEU-6 Here is an overview of the issue: --------------------------------------------------------------------- Key: NEU-6 Summary: Fully create JCE implementation of Certificate Infrastructure Type: New Feature Status: Assigned Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Identity Fix Fors: 1.0 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Wed, 1 Oct 2003 12:58 PM Updated: Wed, 1 Oct 2003 12:58 PM Description: It might be usefull to create a version of neuclear-id in the future that is fully compatible with Sun JCE's <a href="http://java.sun.com/j2se/1.4.2/docs/guide/security/certpath/CertPathProgGuide.html">Certificate and CertificatePath framework</a> Why? Mainly because it would allow easier integration within existing pki code, the main interesting one for me being codesigning. Why not? The API is bloated and I dont think very easy to work with. It isnt very appropriate either for Server or J2ME based apps due to its bloat. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://devone.veraxpay.com:9090/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <pe...@us...> - 2003-10-01 17:35:57
|
Update of /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger
In directory sc8-pr-cvs1:/tmp/cvs-serv31145/src/java/org/neuclear/ledger
Modified Files:
Book.java Ledger.java PostedHeldTransaction.java
PostedTransaction.java Transaction.java TransactionItem.java
UnPostedHeldTransaction.java UnPostedTransaction.java
Log Message:
Made as much as possible immutable for security and reliability reasons.
The only thing that isnt immutable are the items and balance of the
UnpostedTransaction
Index: Book.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger/Book.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Book.java 20 Sep 2003 23:16:18 -0000 1.1.1.1
--- Book.java 1 Oct 2003 17:35:53 -0000 1.2
***************
*** 3,6 ****
--- 3,11 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/10/01 17:35:53 pelle
+ * Made as much as possible immutable for security and reliability reasons.
+ * The only thing that isnt immutable are the items and balance of the
+ * UnpostedTransaction
+ *
* Revision 1.1.1.1 2003/09/20 23:16:18 pelle
* First revision of neuclear-ledger in /cvsroot/neuclear
***************
*** 188,194 ****
! private String book;
! private String name;
! private Ledger ledger;
}
--- 193,199 ----
! private final String book;
! private final String name;
! private final Ledger ledger;
}
Index: Ledger.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger/Ledger.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Ledger.java 20 Sep 2003 23:16:19 -0000 1.1.1.1
--- Ledger.java 1 Oct 2003 17:35:53 -0000 1.2
***************
*** 3,6 ****
--- 3,11 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/10/01 17:35:53 pelle
+ * Made as much as possible immutable for security and reliability reasons.
+ * The only thing that isnt immutable are the items and balance of the
+ * UnpostedTransaction
+ *
* Revision 1.1.1.1 2003/09/20 23:16:19 pelle
* First revision of neuclear-ledger in /cvsroot/neuclear
***************
*** 260,265 ****
}
! private String name;
! private String id;
/**
--- 265,270 ----
}
! private final String name;
! private final String id;
/**
Index: PostedHeldTransaction.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger/PostedHeldTransaction.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PostedHeldTransaction.java 20 Sep 2003 23:16:17 -0000 1.1.1.1
--- PostedHeldTransaction.java 1 Oct 2003 17:35:53 -0000 1.2
***************
*** 13,22 ****
public PostedHeldTransaction(UnPostedHeldTransaction orig, String xid) throws InvalidTransactionException {
super(orig, xid);
! this.data=orig;
}
public Date getExpiryTime() {
! return data.getExpiryTime();
}
! private UnPostedHeldTransaction data;
/**
--- 13,22 ----
public PostedHeldTransaction(UnPostedHeldTransaction orig, String xid) throws InvalidTransactionException {
super(orig, xid);
! this.expiryTime=orig.getExpiryTime();
}
public Date getExpiryTime() {
! return expiryTime;
}
! final private Date expiryTime;
/**
Index: PostedTransaction.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger/PostedTransaction.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** PostedTransaction.java 20 Sep 2003 23:16:18 -0000 1.1.1.1
--- PostedTransaction.java 1 Oct 2003 17:35:53 -0000 1.2
***************
*** 7,10 ****
--- 7,15 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/10/01 17:35:53 pelle
+ * Made as much as possible immutable for security and reliability reasons.
+ * The only thing that isnt immutable are the items and balance of the
+ * UnpostedTransaction
+ *
* Revision 1.1.1.1 2003/09/20 23:16:18 pelle
* First revision of neuclear-ledger in /cvsroot/neuclear
***************
*** 34,37 ****
--- 39,43 ----
import java.util.Date;
import java.util.Iterator;
+ import java.util.List;
/**
* This class defines the type of Transactions that have been posted. They are therefore immutable.
***************
*** 47,53 ****
*/
PostedTransaction(UnPostedTransaction orig,String xid) throws InvalidTransactionException {
! super(orig.getLedger());
! this.data = orig;
this.xid=xid;
}
--- 53,59 ----
*/
PostedTransaction(UnPostedTransaction orig,String xid) throws InvalidTransactionException {
! super(orig.getLedger(),orig.getTransactionTime(),orig.getComment());
this.xid=xid;
+ this.items=orig.getItemArray();
}
***************
*** 122,137 ****
! public Date getTransactionTime() {
! return data.getTransactionTime();
! }
! public String getComment() {
! return data.getComment();
! }
! public Iterator getItems() {
! return data.getItems();
}
--- 128,147 ----
! public Iterator getItems() {
! return new Iterator() {
! int i=0;
! public boolean hasNext() {
! return i<items.length;
! }
+ public Object next() {
+ return items[i++];
+ }
+ public void remove() {
! }
! };
}
***************
*** 139,144 ****
return xid;
}
! private UnPostedTransaction data;
! private String xid;
}
--- 149,154 ----
return xid;
}
! private final TransactionItem[] items;
! private final String xid;
}
Index: Transaction.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger/Transaction.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Transaction.java 20 Sep 2003 23:16:18 -0000 1.1.1.1
--- Transaction.java 1 Oct 2003 17:35:53 -0000 1.2
***************
*** 3,6 ****
--- 3,11 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/10/01 17:35:53 pelle
+ * Made as much as possible immutable for security and reliability reasons.
+ * The only thing that isnt immutable are the items and balance of the
+ * UnpostedTransaction
+ *
* Revision 1.1.1.1 2003/09/20 23:16:18 pelle
* First revision of neuclear-ledger in /cvsroot/neuclear
***************
*** 42,49 ****
public abstract class Transaction {
! Transaction(Ledger ledger) throws InvalidTransactionException {
if (ledger==null)
throw new InvalidTransactionException(ledger,"Transaction must have an associated ledger");
this.ledger=ledger;
}
--- 47,56 ----
public abstract class Transaction {
! Transaction(Ledger ledger,Date transactionTime,String comment) throws InvalidTransactionException {
if (ledger==null)
throw new InvalidTransactionException(ledger,"Transaction must have an associated ledger");
this.ledger=ledger;
+ this.transactionTime=transactionTime;
+ this.comment=comment;
}
***************
*** 90,97 ****
! public abstract Date getTransactionTime();
! public abstract String getComment();
public abstract Iterator getItems();
--- 97,108 ----
! public Date getTransactionTime() {
! return transactionTime;
! }
! public String getComment() {
! return comment;
! }
public abstract Iterator getItems();
***************
*** 101,105 ****
}
! private Ledger ledger;
}
--- 112,118 ----
}
! final private Ledger ledger;
! private final Date transactionTime;
! private final String comment;
}
Index: TransactionItem.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger/TransactionItem.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** TransactionItem.java 20 Sep 2003 23:16:18 -0000 1.1.1.1
--- TransactionItem.java 1 Oct 2003 17:35:53 -0000 1.2
***************
*** 7,10 ****
--- 7,15 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/10/01 17:35:53 pelle
+ * Made as much as possible immutable for security and reliability reasons.
+ * The only thing that isnt immutable are the items and balance of the
+ * UnpostedTransaction
+ *
* Revision 1.1.1.1 2003/09/20 23:16:18 pelle
* First revision of neuclear-ledger in /cvsroot/neuclear
***************
*** 31,35 ****
}
! private Book book;
! private double amount;
}
--- 36,40 ----
}
! private final Book book;
! private final double amount;
}
Index: UnPostedHeldTransaction.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger/UnPostedHeldTransaction.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** UnPostedHeldTransaction.java 20 Sep 2003 23:16:18 -0000 1.1.1.1
--- UnPostedHeldTransaction.java 1 Oct 2003 17:35:53 -0000 1.2
***************
*** 8,11 ****
--- 8,16 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/10/01 17:35:53 pelle
+ * Made as much as possible immutable for security and reliability reasons.
+ * The only thing that isnt immutable are the items and balance of the
+ * UnpostedTransaction
+ *
* Revision 1.1.1.1 2003/09/20 23:16:18 pelle
* First revision of neuclear-ledger in /cvsroot/neuclear
***************
*** 71,74 ****
}
! private Date expiryTime;
}
--- 76,79 ----
}
! private final Date expiryTime;
}
Index: UnPostedTransaction.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger/UnPostedTransaction.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** UnPostedTransaction.java 20 Sep 2003 23:16:18 -0000 1.1.1.1
--- UnPostedTransaction.java 1 Oct 2003 17:35:53 -0000 1.2
***************
*** 8,11 ****
--- 8,16 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/10/01 17:35:53 pelle
+ * Made as much as possible immutable for security and reliability reasons.
+ * The only thing that isnt immutable are the items and balance of the
+ * UnpostedTransaction
+ *
* Revision 1.1.1.1 2003/09/20 23:16:18 pelle
* First revision of neuclear-ledger in /cvsroot/neuclear
***************
*** 56,60 ****
}
UnPostedTransaction(Ledger ledger, String comment, Date transactionTime, boolean posted) throws InvalidTransactionException {
! super(ledger);
// if (amount<0)
// throw new TransactionException("Negative Transactions are not allowed");
--- 61,65 ----
}
UnPostedTransaction(Ledger ledger, String comment, Date transactionTime, boolean posted) throws InvalidTransactionException {
! super(ledger,transactionTime,comment);
// if (amount<0)
// throw new TransactionException("Negative Transactions are not allowed");
***************
*** 62,67 ****
throw new InvalidTransactionException(ledger,"Transaction must have a Transaction Time");
- this.transactionTime=transactionTime;
- this.comment=comment;
balance=0;
items=new LinkedList();
--- 67,70 ----
***************
*** 78,82 ****
getLedger().beginLinkedTransaction();
postTransaction=postTransaction();
- posted=true;
getLedger().endLinkedTransactions();
} else
--- 81,84 ----
***************
*** 105,124 ****
}
- public Date getTransactionTime() {
- return transactionTime;
- }
-
- public String getComment() {
- return comment;
- }
-
public Iterator getItems() {
return items.iterator();
}
! public final boolean isPosted() {
! return posted;
}
/**
* Adds an item to an unposted Transaction.
--- 107,123 ----
}
public Iterator getItems() {
return items.iterator();
}
+ TransactionItem [] getItemArray() {
+ TransactionItem itemarray[]=new TransactionItem[items.size()];
+ for (int i = 0; i < items.size(); i++) {
+ itemarray[0] = (org.neuclear.ledger.TransactionItem) items.get(i);
! }
! return itemarray;
}
+
/**
* Adds an item to an unposted Transaction.
***************
*** 134,139 ****
*/
public synchronized double addItem(Book book,double amount) throws InvalidTransactionException {
- if (isPosted())
- throw new InvalidTransactionException(getLedger(),"This Transaction has already been posted. You can no longer add items to it.");
if (book==null)
throw new InvalidTransactionException(getLedger(),"You must supply a valid Book");
--- 133,136 ----
***************
*** 144,151 ****
return balance;
}
! private Date transactionTime;
! private String comment;
private List items;
private double balance;
- private boolean posted;
}
--- 141,146 ----
return balance;
}
!
private List items;
private double balance;
}
|
|
From: <pe...@us...> - 2003-10-01 17:05:44
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/jce
In directory sc8-pr-cvs1:/tmp/cvs-serv25143/src/java/org/neuclear/id/jce
Modified Files:
NeuClearCertificateFactory.java NeuClearJCEProvider.java
Removed Files:
NeuClearCertificate.java
Log Message:
Moved the NeuClearCertificate class to be an inner class of Identity.
Index: NeuClearCertificateFactory.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/jce/NeuClearCertificateFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NeuClearCertificateFactory.java 30 Sep 2003 23:25:15 -0000 1.1
--- NeuClearCertificateFactory.java 1 Oct 2003 17:05:37 -0000 1.2
***************
*** 32,35 ****
--- 32,38 ----
$Id$
$Log$
+ Revision 1.2 2003/10/01 17:05:37 pelle
+ Moved the NeuClearCertificate class to be an inner class of Identity.
+
Revision 1.1 2003/09/30 23:25:15 pelle
Added new JCE Provider and java Certificate implementation for NeuClear Identity.
***************
*** 38,42 ****
/**
! *
* User: pelleb
* Date: Sep 30, 2003
--- 41,52 ----
/**
! * This is the beginnings of integrating NeuClear into the JCE architecture allowing
! * NeuClear to be plugged in relatively easily for other types of applications such as
! * Code signing.
! * <p>
! * Currently the provider provides a CertificateFactory with the name NeuClear. This
! * can be instantiated using:<br>
! * <tt> CertificateFactory certfact=CertificateFactory.getInstance("NeuClear");</tt><p>
! *
* User: pelleb
* Date: Sep 30, 2003
***************
*** 44,51 ****
*/
public class NeuClearCertificateFactory extends CertificateFactorySpi {
! public Certificate engineGenerateCertificate(InputStream inputStream) throws CertificateException {
try {
Identity id=(Identity) VerifyingReader.getInstance().read(inputStream);
! return new NeuClearCertificate(id);
} catch (NeudistException e) {
throw new CertificateException("NeuClear: Problem reading Certificate:"+e.getMessage());
--- 54,61 ----
*/
public class NeuClearCertificateFactory extends CertificateFactorySpi {
! final public Certificate engineGenerateCertificate(InputStream inputStream) throws CertificateException {
try {
Identity id=(Identity) VerifyingReader.getInstance().read(inputStream);
! return id.getCertificate();
} catch (NeudistException e) {
throw new CertificateException("NeuClear: Problem reading Certificate:"+e.getMessage());
***************
*** 53,57 ****
}
! public Collection engineGenerateCertificates(InputStream inputStream) throws CertificateException {
List list=new ArrayList(1);
list.add(engineGenerateCertificate(inputStream));
--- 63,67 ----
}
! final public Collection engineGenerateCertificates(InputStream inputStream) throws CertificateException {
List list=new ArrayList(1);
list.add(engineGenerateCertificate(inputStream));
***************
*** 59,67 ****
}
! public CRL engineGenerateCRL(InputStream inputStream) throws CRLException {
return null;
}
! public Collection engineGenerateCRLs(InputStream inputStream) throws CRLException {
return new ArrayList(0);
}
--- 69,77 ----
}
! final public CRL engineGenerateCRL(InputStream inputStream) throws CRLException {
return null;
}
! final public Collection engineGenerateCRLs(InputStream inputStream) throws CRLException {
return new ArrayList(0);
}
Index: NeuClearJCEProvider.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/jce/NeuClearJCEProvider.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NeuClearJCEProvider.java 30 Sep 2003 23:25:15 -0000 1.1
--- NeuClearJCEProvider.java 1 Oct 2003 17:05:37 -0000 1.2
***************
*** 23,26 ****
--- 23,29 ----
$Id$
$Log$
+ Revision 1.2 2003/10/01 17:05:37 pelle
+ Moved the NeuClearCertificate class to be an inner class of Identity.
+
Revision 1.1 2003/09/30 23:25:15 pelle
Added new JCE Provider and java Certificate implementation for NeuClear Identity.
***************
*** 29,38 ****
/**
! *
* User: pelleb
* Date: Sep 30, 2003
* Time: 4:32:08 PM
*/
! public class NeuClearJCEProvider extends Provider {
public NeuClearJCEProvider() {
super("NeuClear", 0.7,"NeuClear Provider Implementing NeuClear Digital Certificates");
--- 32,48 ----
/**
! * This is the beginnings of integrating NeuClear into the JCE architecture allowing
! * NeuClear to be plugged in relatively easily for other types of applications such as
! * Code signing.
! * <p>
! * Currently the provider provides a CertificateFactory with the name NeuClear. This
! * can be instantiated using:<br>
! * <tt> CertificateFactory certfact=CertificateFactory.getInstance("NeuClear");</tt><p>
! *
* User: pelleb
* Date: Sep 30, 2003
* Time: 4:32:08 PM
*/
! public final class NeuClearJCEProvider extends Provider {
public NeuClearJCEProvider() {
super("NeuClear", 0.7,"NeuClear Provider Implementing NeuClear Digital Certificates");
--- NeuClearCertificate.java DELETED ---
|
|
From: <pe...@us...> - 2003-10-01 17:05:44
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/jce
In directory sc8-pr-cvs1:/tmp/cvs-serv25143/src/test/org/neuclear/id/jce
Added Files:
NeuClearJCETest.java
Log Message:
Moved the NeuClearCertificate class to be an inner class of Identity.
--- NEW FILE: NeuClearJCETest.java ---
package org.neuclear.id.jce;
import junit.framework.TestCase;
import java.security.Security;
import java.security.cert.CertificateFactory;
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: NeuClearJCETest.java,v 1.1 2003/10/01 17:05:38 pelle Exp $
$Log: NeuClearJCETest.java,v $
Revision 1.1 2003/10/01 17:05:38 pelle
Moved the NeuClearCertificate class to be an inner class of Identity.
*/
/**
*
* User: pelleb
* Date: Oct 1, 2003
* Time: 11:50:58 AM
*/
public class NeuClearJCETest extends TestCase {
public NeuClearJCETest(String string) {
super(string);
if (Security.getProvider("NeuClear") == null) {
Security.addProvider(new NeuClearJCEProvider());
System.err.println("Added NeuClearJCEProvider");
}
}
public void testProvider() {
assertNotNull(Security.getProvider("NeuClear"));
}
public void testCertificateFactory() throws CertificateException {
assertNotNull(CertificateFactory.getInstance("NeuClear"));
}
}
|
|
From: <pe...@us...> - 2003-10-01 17:05:44
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv25143/src/java/org/neuclear/id
Modified Files:
Identity.java Named.java SignedNamedObject.java
Log Message:
Moved the NeuClearCertificate class to be an inner class of Identity.
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Identity.java 29 Sep 2003 23:17:31 -0000 1.4
--- Identity.java 1 Oct 2003 17:05:37 -0000 1.5
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.5 2003/10/01 17:05:37 pelle
+ * Moved the NeuClearCertificate class to be an inner class of Identity.
+ *
* Revision 1.4 2003/09/29 23:17:31 pelle
* Changes to the senders. Now the senders only work with NamedObjectBuilders
***************
*** 172,176 ****
import org.neuclear.id.builders.NamedObjectBuilder;
! import java.security.PublicKey;
import java.util.Iterator;
import java.util.List;
--- 175,182 ----
import org.neuclear.id.builders.NamedObjectBuilder;
! import java.security.*;
! import java.security.cert.Certificate;
! import java.security.cert.CertificateEncodingException;
! import java.security.cert.CertificateException;
import java.util.Iterator;
import java.util.List;
***************
*** 193,197 ****
*/
! Identity(String name, Identity signatory, Timestamp timestamp, String digest, String repository, String signer, String logger, String receiver, PublicKey[] pubs) throws NeudistException {
super(name, signatory, timestamp, digest);
this.repository = repository;
--- 199,203 ----
*/
! Identity(String name, Identity signatory, Timestamp timestamp, String digest, String repository, String signer, String logger, String receiver, PublicKey pub) throws NeudistException {
super(name, signatory, timestamp, digest);
this.repository = repository;
***************
*** 199,203 ****
this.signer = signer;
this.receiver = receiver;
! this.pubs = pubs;
}
--- 205,209 ----
this.signer = signer;
this.receiver = receiver;
! this.pub = pub;
}
***************
*** 233,238 ****
return "Identity";
}
! public PublicKey[] getPublicKeys(){
! return pubs;
}
private final String repository;
--- 239,248 ----
return "Identity";
}
!
! public PublicKey getPublicKey(){
! return pub;
! }
! public Certificate getCertificate() {
! return new NeuClearCertificate();
}
private final String repository;
***************
*** 241,245 ****
private final String receiver;
! private final PublicKey pubs[];
private final static Identity createRootIdentity() {
--- 251,255 ----
private final String receiver;
! private final PublicKey pub;
private final static Identity createRootIdentity() {
***************
*** 248,252 ****
PublicKey rootpk=CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP);
return new Identity("neu://",null,new Timestamp(0),null,NSResolver.NSROOTSTORE,
! null,null,null,new PublicKey[]{rootpk});
} catch (NeudistException e) {
e.printStackTrace();
--- 258,262 ----
PublicKey rootpk=CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP);
return new Identity("neu://",null,new Timestamp(0),null,NSResolver.NSROOTSTORE,
! null,null,null,rootpk);
} catch (NeudistException e) {
e.printStackTrace();
***************
*** 259,262 ****
--- 269,273 ----
public static final Identity NEUROOT=createRootIdentity();
+
/**
* Returns the fixed Root PublicKey
***************
*** 268,271 ****
--- 279,326 ----
}
+ private class NeuClearCertificate extends Certificate {
+ public NeuClearCertificate() {
+ super("NeuClear");
+
+ }
+
+ /**
+ * 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 {
+ return getName().getBytes();
+ }
+
+ /**
+ * Since the Instance of Identity implies that it has already been verified in the
+ * 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 {
+ if (!getSignatory().getPublicKey().equals(publicKey))
+ throw new SignatureException("Key didnt match Signature");
+ }
+
+ public void verify(PublicKey publicKey, String string) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
+ verify(publicKey);
+ }
+
+ public PublicKey getPublicKey() {
+ return pub;
+ }
+ public String toString() {
+ return getName();
+ }
+
+ }
//TODO I dont like this being public
public final static class Reader implements NamedObjectReader {
***************
*** 282,300 ****
Element allowElement=elem.element(DocumentHelper.createQName("allow",SignedNamedObject.NS_NSDL));
! List keys=allowElement.elements(XMLSecTools.createQName("KeyInfo"));
! PublicKey pubs[]=new PublicKey[keys.size()];
! int i=0;
! for (Iterator iter=keys.iterator();iter.hasNext();i++) {
! KeyInfo ki=new KeyInfo((Element)iter.next());
! pubs[i]=ki.getPublicKey();
! }
!
! return new Identity(name,signatory,timestamp,digest,repository,signer,logger,receiver,pubs);
}
}
- public static void main(String args[]){
- }
}
--- 337,347 ----
Element allowElement=elem.element(DocumentHelper.createQName("allow",SignedNamedObject.NS_NSDL));
! KeyInfo ki=new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo")));
! PublicKey pub=ki.getPublicKey();
! return new Identity(name,signatory,timestamp,digest,repository,signer,logger,receiver,pub);
}
}
}
Index: Named.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Named.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Named.java 24 Sep 2003 23:56:48 -0000 1.1
--- Named.java 1 Oct 2003 17:05:37 -0000 1.2
***************
*** 23,26 ****
--- 23,29 ----
$Id$
$Log$
+ Revision 1.2 2003/10/01 17:05:37 pelle
+ Moved the NeuClearCertificate class to be an inner class of Identity.
+
Revision 1.1 2003/09/24 23:56:48 pelle
Refactoring nearly done. New model for creating signed objects.
***************
*** 41,46 ****
*/
public interface Named {
! String getName() throws NeudistException;
! String getLocalName() throws NeudistException;
}
--- 44,49 ----
*/
public interface Named {
! String getName() ;
! String getLocalName();
}
Index: SignedNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedObject.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SignedNamedObject.java 30 Sep 2003 23:25:14 -0000 1.3
--- SignedNamedObject.java 1 Oct 2003 17:05:37 -0000 1.4
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/10/01 17:05:37 pelle
+ * Moved the NeuClearCertificate class to be an inner class of Identity.
+ *
* Revision 1.3 2003/09/30 23:25:14 pelle
* Added new JCE Provider and java Certificate implementation for NeuClear Identity.
***************
*** 171,175 ****
* @return String containing the fully qualified URI of an object
*/
! public String getName() throws NeudistException {
return name;
}
--- 174,178 ----
* @return String containing the fully qualified URI of an object
*/
! public String getName() {
return name;
}
***************
*** 179,183 ****
* @return Parent Name
*/
! public String getLocalName() throws NeudistException {
String fullName = getName();
int i = fullName.lastIndexOf('/');
--- 182,186 ----
* @return Parent Name
*/
! public String getLocalName() {
String fullName = getName();
int i = fullName.lastIndexOf('/');
|
|
From: <pe...@us...> - 2003-10-01 17:05:44
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv25143/src/java/org/neuclear/id/builders
Modified Files:
NamedObjectBuilder.java
Log Message:
Moved the NeuClearCertificate class to be an inner class of Identity.
Index: NamedObjectBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/NamedObjectBuilder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NamedObjectBuilder.java 27 Sep 2003 19:23:11 -0000 1.1
--- NamedObjectBuilder.java 1 Oct 2003 17:05:37 -0000 1.2
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/10/01 17:05:37 pelle
+ * Moved the NeuClearCertificate class to be an inner class of Identity.
+ *
* Revision 1.1 2003/09/27 19:23:11 pelle
* Added Builders to create named objects from scratch.
***************
*** 169,174 ****
* @return String containing the fully qualified URI of an object
*/
! public String getName() throws NeudistException{
! return NSTools.normalizeNameURI(getElement().attributeValue(getNameAttrQName()));
}
--- 172,181 ----
* @return String containing the fully qualified URI of an object
*/
! public String getName() {
! try {
! return NSTools.normalizeNameURI(getElement().attributeValue(getNameAttrQName()));
! } catch (NeudistException e) {
! return "Unknown";
! }
}
***************
*** 177,181 ****
* @return Parent Name
*/
! public String getLocalName() throws NeudistException{
String fullName=getName();
int i=fullName.lastIndexOf('/');
--- 184,188 ----
* @return Parent Name
*/
! public String getLocalName() {
String fullName=getName();
int i=fullName.lastIndexOf('/');
***************
*** 201,210 ****
*/
public final String getURI() throws XMLSecurityException {
! try {
! return getName();
! } catch (NeudistException e) {
! XMLSecTools.rethrowException(e); //To change body of catch statement use Options | File Templates.
! }
! return null;
}
--- 208,212 ----
*/
public final String getURI() throws XMLSecurityException {
! return getName();
}
|
|
From: <pe...@us...> - 2003-10-01 17:05:44
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv25143/src/java/org/neuclear/id/verifier
Modified Files:
VerifyingReader.java
Log Message:
Moved the NeuClearCertificate class to be an inner class of Identity.
Index: VerifyingReader.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier/VerifyingReader.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** VerifyingReader.java 24 Sep 2003 23:56:48 -0000 1.1
--- VerifyingReader.java 1 Oct 2003 17:05:38 -0000 1.2
***************
*** 43,46 ****
--- 43,49 ----
$Id$
$Log$
+ Revision 1.2 2003/10/01 17:05:38 pelle
+ Moved the NeuClearCertificate class to be an inner class of Identity.
+
Revision 1.1 2003/09/24 23:56:48 pelle
Refactoring nearly done. New model for creating signed objects.
***************
*** 83,87 ****
PublicKey pubs[]=null;
Identity signatory=NSResolver.resolveIdentity(signatoryName);
! if (XMLSecTools.verifySignature(elem,signatory.getPublicKeys())) {
//I should be able to get this from within. This is just a quick hack.
String digest=new String(CryptoTools.digest(XMLSecTools.canonicalize(elem)));
--- 86,90 ----
PublicKey pubs[]=null;
Identity signatory=NSResolver.resolveIdentity(signatoryName);
! if (XMLSecTools.verifySignature(elem,signatory.getPublicKey())) {
//I should be able to get this from within. This is just a quick hack.
String digest=new String(CryptoTools.digest(XMLSecTools.canonicalize(elem)));
|
|
From: <pe...@us...> - 2003-10-01 16:48:56
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/jce In directory sc8-pr-cvs1:/tmp/cvs-serv22320/src/test/org/neuclear/id/jce Log Message: Directory /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/jce added to the repository |
|
From: <pe...@us...> - 2003-09-30 23:25:19
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/jce
In directory sc8-pr-cvs1:/tmp/cvs-serv26499/src/java/org/neuclear/id/jce
Added Files:
NeuClearCertificate.java NeuClearCertificateFactory.java
NeuClearJCEProvider.java
Log Message:
Added new JCE Provider and java Certificate implementation for NeuClear Identity.
--- NEW FILE: NeuClearCertificate.java ---
package org.neuclear.id.jce;
import org.neuclear.id.Identity;
import java.security.cert.Certificate;
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
import java.security.*;
/*
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: NeuClearCertificate.java,v 1.1 2003/09/30 23:25:15 pelle Exp $
$Log: NeuClearCertificate.java,v $
Revision 1.1 2003/09/30 23:25:15 pelle
Added new JCE Provider and java Certificate implementation for NeuClear Identity.
*/
/**
*
* User: pelleb
* Date: Sep 30, 2003
* Time: 4:19:29 PM
*/
public class NeuClearCertificate extends Certificate {
public NeuClearCertificate(Identity id) {
super(NEUCLEAR);
this.id=id;
}
public byte[] getEncoded() throws CertificateEncodingException {
return new byte[0];
}
public void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
}
public void verify(PublicKey publicKey, String string) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
}
/**
* Always returns the first of the authorized keys
* @return
*/
public PublicKey getPublicKey() {
return id.getPublicKeys()[0];
}
public String toString() {
return "";
}
private final Identity id;
private final static String NEUCLEAR="NeuClear";
}
--- NEW FILE: NeuClearCertificateFactory.java ---
package org.neuclear.id.jce;
import org.neuclear.id.Identity;
import org.neuclear.id.verifier.VerifyingReader;
import org.neudist.utils.NeudistException;
import java.security.cert.*;
import java.io.InputStream;
import java.util.Collection;
import java.util.List;
import java.util.LinkedList;
import java.util.ArrayList;
/*
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: NeuClearCertificateFactory.java,v 1.1 2003/09/30 23:25:15 pelle Exp $
$Log: NeuClearCertificateFactory.java,v $
Revision 1.1 2003/09/30 23:25:15 pelle
Added new JCE Provider and java Certificate implementation for NeuClear Identity.
*/
/**
*
* User: pelleb
* Date: Sep 30, 2003
* Time: 4:39:08 PM
*/
public class NeuClearCertificateFactory extends CertificateFactorySpi {
public Certificate engineGenerateCertificate(InputStream inputStream) throws CertificateException {
try {
Identity id=(Identity) VerifyingReader.getInstance().read(inputStream);
return new NeuClearCertificate(id);
} catch (NeudistException e) {
throw new CertificateException("NeuClear: Problem reading Certificate:"+e.getMessage());
}
}
public Collection engineGenerateCertificates(InputStream inputStream) throws CertificateException {
List list=new ArrayList(1);
list.add(engineGenerateCertificate(inputStream));
return list;
}
public CRL engineGenerateCRL(InputStream inputStream) throws CRLException {
return null;
}
public Collection engineGenerateCRLs(InputStream inputStream) throws CRLException {
return new ArrayList(0);
}
}
--- NEW FILE: NeuClearJCEProvider.java ---
package org.neuclear.id.jce;
import java.security.Provider;
/*
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: NeuClearJCEProvider.java,v 1.1 2003/09/30 23:25:15 pelle Exp $
$Log: NeuClearJCEProvider.java,v $
Revision 1.1 2003/09/30 23:25:15 pelle
Added new JCE Provider and java Certificate implementation for NeuClear Identity.
*/
/**
*
* User: pelleb
* Date: Sep 30, 2003
* Time: 4:32:08 PM
*/
public class NeuClearJCEProvider extends Provider {
public NeuClearJCEProvider() {
super("NeuClear", 0.7,"NeuClear Provider Implementing NeuClear Digital Certificates");
put("CertificateFactory.NeuClear","org.neuclear.id.jce.NeuClearCertificateFactory");
}
}
|
|
From: <pe...@us...> - 2003-09-30 23:25:19
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv26499/src/test/org/neuclear/id/verifier
Modified Files:
VerificationTest.java
Log Message:
Added new JCE Provider and java Certificate implementation for NeuClear Identity.
Index: VerificationTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/verifier/VerificationTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** VerificationTest.java 27 Sep 2003 19:23:11 -0000 1.1
--- VerificationTest.java 30 Sep 2003 23:25:15 -0000 1.2
***************
*** 8,11 ****
--- 8,12 ----
import org.neudist.utils.RegexFileNameFilter;
import org.neudist.xml.xmlsec.XMLSecTools;
+ import org.neudist.crypto.CryptoTools;
import org.neuclear.id.SignedNamedObject;
***************
*** 32,35 ****
--- 33,39 ----
$Id$
$Log$
+ Revision 1.2 2003/09/30 23:25:15 pelle
+ Added new JCE Provider and java Certificate implementation for NeuClear Identity.
+
Revision 1.1 2003/09/27 19:23:11 pelle
Added Builders to create named objects from scratch.
***************
*** 47,50 ****
--- 51,55 ----
super(string);
+ CryptoTools.ensureProvider();
reader=VerifyingReader.getInstance();
}
|
|
From: <pe...@us...> - 2003-09-30 23:25:18
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv26499/src/java/org/neuclear/id
Modified Files:
SignedNamedObject.java
Log Message:
Added new JCE Provider and java Certificate implementation for NeuClear Identity.
Index: SignedNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedObject.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SignedNamedObject.java 29 Sep 2003 23:17:31 -0000 1.2
--- SignedNamedObject.java 30 Sep 2003 23:25:14 -0000 1.3
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.3 2003/09/30 23:25:14 pelle
+ * Added new JCE Provider and java Certificate implementation for NeuClear Identity.
+ *
* Revision 1.2 2003/09/29 23:17:31 pelle
* Changes to the senders. Now the senders only work with NamedObjectBuilders
***************
*** 189,196 ****
--- 192,207 ----
}
+ /**
+ * The Signatory of the current document
+ * @return
+ */
public Identity getSignatory() {
return signer;
}
+ /**
+ * The SHA1 Digest of the full XML encoded document
+ * @return
+ */
public String getDigest() {
return digest;
|
|
From: <pe...@us...> - 2003-09-30 21:17:29
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/jce In directory sc8-pr-cvs1:/tmp/cvs-serv763/src/java/org/neuclear/id/jce Log Message: Directory /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/jce added to the repository |
|
From: <pe...@us...> - 2003-09-29 23:17:37
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders
In directory sc8-pr-cvs1:/tmp/cvs-serv8611/src/java/org/neuclear/senders
Modified Files:
LogSender.java Sender.java SmtpSender.java SoapSender.java
Log Message:
Changes to the senders. Now the senders only work with NamedObjectBuilders
which are the only NamedObject representations that contain full XML.
Index: LogSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/LogSender.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LogSender.java 26 Sep 2003 23:53:10 -0000 1.6
--- LogSender.java 29 Sep 2003 23:17:32 -0000 1.7
***************
*** 2,5 ****
--- 2,7 ----
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.id.Named;
+ import org.neuclear.id.builders.NamedObjectBuilder;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.time.TimeTools;
***************
*** 23,26 ****
--- 25,32 ----
* $Id$
* $Log$
+ * Revision 1.7 2003/09/29 23:17:32 pelle
+ * Changes to the senders. Now the senders only work with NamedObjectBuilders
+ * which are the only NamedObject representations that contain full XML.
+ *
* Revision 1.6 2003/09/26 23:53:10 pelle
* Changes mainly in receiver and related fun.
***************
*** 68,74 ****
*/
public class LogSender extends Sender {
! public void send(String endpoint, SignedNamedObject obj) throws NeudistException {
try {
! String digest = URLEncoder.encode(Base64.encode(obj.getDigest().getBytes()), "UTF-8");
String name = URLEncoder.encode(obj.getName(), "UTF-8");
URL url = new URL(Utility.denullString(endpoint, LOGGER) + "?nohtml=1&name=" + name + "&digest=" + digest);
--- 74,80 ----
*/
public class LogSender extends Sender {
! public void send(String endpoint, NamedObjectBuilder obj) throws NeudistException {
try {
! String digest = URLEncoder.encode(Base64.encode(obj.getDigest()), "UTF-8");
String name = URLEncoder.encode(obj.getName(), "UTF-8");
URL url = new URL(Utility.denullString(endpoint, LOGGER) + "?nohtml=1&name=" + name + "&digest=" + digest);
***************
*** 88,91 ****
--- 94,98 ----
}
+ /*
public static void main(String args[]) {
try {
***************
*** 98,101 ****
--- 105,109 ----
}
}
+ */
public static Timestamp getTimeStamp(String endpoint, byte rdigest[]) throws NeudistException {
***************
*** 128,131 ****
--- 136,140 ----
}
+ /*
private static void logObject(String name) throws NeudistException {
System.out.print("Fetching...");
***************
*** 138,141 ****
--- 147,151 ----
}
+ */
public static final String LOGGER = "http://logger.neuclear.org/log.cgi";
}
Index: Sender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/Sender.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Sender.java 27 Sep 2003 19:23:11 -0000 1.3
--- Sender.java 29 Sep 2003 23:17:32 -0000 1.4
***************
*** 1,38 ****
package org.neuclear.senders;
! import org.neuclear.id.SignedNamedObject;
! import org.neuclear.id.builders.NamedObjectBuilder;
import org.neudist.utils.NeudistException;
! /*
! 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
! */
! /**
! *
! * User: pelleb
! * Date: Sep 22, 2003
! * Time: 1:28:39 PM
! */
! public abstract class Sender {
! public abstract void send(String endpoint, NamedObjectBuilder obj) throws NeudistException;
- public static void quickSend(String receiver, NamedObjectBuilder obj) {
}
}
--- 1,59 ----
package org.neuclear.senders;
! /**
! * (C) 2003 Antilles Software Ventures SA
! * User: pelleb
! * Date: Feb 14, 2003
! * Time: 9:29:29 AM
! * $Id$
! * $Log$
! * Revision 1.4 2003/09/29 23:17:32 pelle
! * Changes to the senders. Now the senders only work with NamedObjectBuilders
! * which are the only NamedObject representations that contain full XML.
! *
! */
import org.neudist.utils.NeudistException;
+ import org.neuclear.id.builders.NamedObjectBuilder;
! import java.util.HashMap;
! import java.util.Map;
! public abstract class Sender {
! public abstract void send(String endpoint,NamedObjectBuilder obj) throws NeudistException;
! public static void quickSend(String endpoint,NamedObjectBuilder obj) throws NeudistException {
! int protloc=endpoint.indexOf(":");
! if (protloc<0)
! throw new NeudistException(endpoint+"Is not in URL format");
! String protocol=endpoint.substring(0,protloc);
! Sender sender=getSender(protocol);
! if (sender==null)
! throw new NeudistException("Unsupported Send Protocol:" + endpoint.toString());
! sender.send(endpoint,obj);
! }
! public static Sender getSender(String protocol) {
! if (SENDERS==null){
! SENDERS=new HashMap();
! SENDERS.put("soap",new SoapSender());
! SENDERS.put("mailto",new SmtpSender());
! }
! return (Sender) SENDERS.get(protocol);
! }
! private static Map SENDERS;
! public static void main(String args[]){
! /*
! try {
! NameSpace pelle=(NameSpace)NamedObjectFactory.fetchNamedObject("neu://free/pelle");
! NamedObject free=NamedObjectFactory.fetchNamedObject("neu://free");
! pelle.send(free);
! } catch (NeudistException e) {
! e.printStackTrace(); //To change body of catch statement use Options | File Templates.
! }
! */
}
}
+
Index: SmtpSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/SmtpSender.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SmtpSender.java 26 Sep 2003 00:22:07 -0000 1.5
--- SmtpSender.java 29 Sep 2003 23:17:32 -0000 1.6
***************
*** 8,11 ****
--- 8,15 ----
* $Id$
* $Log$
+ * Revision 1.6 2003/09/29 23:17:32 pelle
+ * Changes to the senders. Now the senders only work with NamedObjectBuilders
+ * which are the only NamedObject representations that contain full XML.
+ *
* Revision 1.5 2003/09/26 00:22:07 pelle
* Cleanups and final changes to code for refactoring of the Verifier and Reader part.
***************
*** 46,49 ****
--- 50,55 ----
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.id.Named;
+ import org.neuclear.id.builders.NamedObjectBuilder;
import org.neudist.utils.NeudistException;
import org.neudist.utils.Utility;
***************
*** 58,62 ****
public class SmtpSender extends Sender {
! public void send(String endpoint, SignedNamedObject obj) throws NeudistException {
Properties props = System.getProperties();
if (endpoint.startsWith("mailto:"))
--- 64,68 ----
public class SmtpSender extends Sender {
! public void send(String endpoint, NamedObjectBuilder obj) throws NeudistException {
Properties props = System.getProperties();
if (endpoint.startsWith("mailto:"))
Index: SoapSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/SoapSender.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SoapSender.java 26 Sep 2003 00:22:07 -0000 1.5
--- SoapSender.java 29 Sep 2003 23:17:32 -0000 1.6
***************
*** 8,11 ****
--- 8,15 ----
* $Id$
* $Log$
+ * Revision 1.6 2003/09/29 23:17:32 pelle
+ * Changes to the senders. Now the senders only work with NamedObjectBuilders
+ * which are the only NamedObject representations that contain full XML.
+ *
* Revision 1.5 2003/09/26 00:22:07 pelle
* Cleanups and final changes to code for refactoring of the Verifier and Reader part.
***************
*** 46,49 ****
--- 50,55 ----
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.id.Named;
+ import org.neuclear.id.builders.NamedObjectBuilder;
import org.neudist.utils.NeudistException;
import org.neudist.xml.soap.SOAPTools;
***************
*** 51,56 ****
public class SoapSender extends Sender {
! public void send(String endpoint, SignedNamedObject obj) throws NeudistException {
! //SOAPTools.soapRequest(endpoint, obj.getElement(), "/receive");TODO Rething this
}
}
--- 57,62 ----
public class SoapSender extends Sender {
! public void send(String endpoint, NamedObjectBuilder obj) throws NeudistException {
! SOAPTools.soapRequest(endpoint, obj.getElement(), "/receive");
}
}
|
|
From: <pe...@us...> - 2003-09-29 23:17:37
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv8611/src/test/org/neuclear/id
Modified Files:
NSToolsTest.java NameSpaceTest.java
Log Message:
Changes to the senders. Now the senders only work with NamedObjectBuilders
which are the only NamedObject representations that contain full XML.
Index: NSToolsTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NSToolsTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NSToolsTest.java 23 Sep 2003 19:16:29 -0000 1.3
--- NSToolsTest.java 29 Sep 2003 23:17:32 -0000 1.4
***************
*** 2,5 ****
--- 2,9 ----
$Id$
$Log$
+ Revision 1.4 2003/09/29 23:17:32 pelle
+ Changes to the senders. Now the senders only work with NamedObjectBuilders
+ which are the only NamedObject representations that contain full XML.
+
Revision 1.3 2003/09/23 19:16:29 pelle
Changed NameSpace to Identity.
***************
*** 75,101 ****
/**
! * @stereotype role
* @author Pelle Braendgaard
*/
public class NSToolsTest extends TestCase {
- public NSToolsTest() {
- super("NSToolsTest");
- setUp();
- }
public NSToolsTest(String name) {
super(name);
- }
-
- /**
- */
- protected void setUp() {
- }
-
- protected void tearDown() {
- }
-
- public static Test suite() {
- return new TestSuite(NSToolsTest.class);
}
--- 79,89 ----
/**
! *
* @author Pelle Braendgaard
*/
public class NSToolsTest extends TestCase {
public NSToolsTest(String name) {
super(name);
}
Index: NameSpaceTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NameSpaceTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NameSpaceTest.java 23 Sep 2003 19:16:29 -0000 1.3
--- NameSpaceTest.java 29 Sep 2003 23:17:32 -0000 1.4
***************
*** 2,5 ****
--- 2,9 ----
$Id$
$Log$
+ Revision 1.4 2003/09/29 23:17:32 pelle
+ Changes to the senders. Now the senders only work with NamedObjectBuilders
+ which are the only NamedObject representations that contain full XML.
+
Revision 1.3 2003/09/23 19:16:29 pelle
Changed NameSpace to Identity.
***************
*** 134,144 ****
*/
public class NameSpaceTest extends TestCase {
! public NameSpaceTest() throws GeneralSecurityException, IOException, FileNotFoundException {
! super("NameSpaceTest");
! setUp();
}
! public NameSpaceTest(String name) {
! super(name);
! }
/**
* The general test setup consists of a minimal neuspace with 4 keys:
--- 138,146 ----
*/
public class NameSpaceTest extends TestCase {
!
! public NameSpaceTest(String string) {
! super(string);
}
!
/**
* The general test setup consists of a minimal neuspace with 4 keys:
***************
*** 198,221 ****
}
- /*
- private Identity createNeuRoot() throws NeudistException {
- return null;//new Identity("neu://",root,root.getPublic());
- }
- private Identity createNeuBob() throws NeudistException {
- return null;//new Identity("neu://bob",root,bob.getPublic());
- }
- private Identity createNeuAlice() throws NeudistException {
- return null;// new Identity("neu://alice",root,alice.getPublic());
- }
- private Identity createNeuBobAlice() throws NeudistException {
- return null;// new Identity("neu://bob/alice",bob,alice.getPublic());
- }
- private Identity createNeuEvilEve() throws NeudistException {
- return null;// new Identity("neu://eve",eve,eve.getPublic());
- }
- */
protected void tearDown() {
! }
private static void sleepabit() {
--- 200,206 ----
}
protected void tearDown() {
! }
private static void sleepabit() {
***************
*** 227,285 ****
}
- public static Test suite() {
-
-
- return new TestSuite(NameSpaceTest.class);
- }
-
- /* public void testCreateRoot() throws NeudistException, InvalidIdentityException{
- Identity neuRoot=createNeuRoot();
- Store neuspace=new MemoryStore();
- neuspace.receive(neuRoot);
- assertNotNull("Test that we can add a root",neuRoot);
- }
- */
- /*
-
- public void testCreateChild() throws NeudistException, InvalidIdentityException{
- MemoryStore neuspace=new MemoryStore();
- Identity neuBob=new Identity("neu://test/bob",bob.getPublic());
- neuBob.sign(test);
- neuspace.receive(neuBob);
- assertNotNull("Test that we can add Bob under the root",neuBob);
-
- }
-
- public void testCreateInvalidChild() throws NeudistException, InvalidIdentityException{
- MemoryStore neuspace=new MemoryStore();
- Identity neuEve=new Identity("neu://test/eve",eve.getPublic());
- neuEve.sign(eve.getPrivate());
- boolean success=false;
- try {
- neuspace.receive(neuEve);
- } catch (InvalidIdentityException e) {
- success=true;
- }
- assertTrue("Test that we cant add Eve's selfsigned Neu under the root",success);
! }
! public static void main(String args[]) {
! try {
! NameSpaceTest test=new NameSpaceTest();
! test.testCreateChild();
! test.testCreateInvalidChild();
! } catch (GeneralSecurityException e) {
! Utility.handleException(e);
! } catch (IOException e) {
! Utility.handleException(e);
! } catch (NeudistException e) {
! Utility.handleException(e);
! }
! }
! */
!
! // KeyPair root;
! // PrivateKey aliceSigner;
! // PrivateKey bobSigner;
PrivateKey test;
KeyPair bob;
--- 212,219 ----
}
! KeyPair root;
! PrivateKey aliceSigner;
! PrivateKey bobSigner;
PrivateKey test;
KeyPair bob;
|
|
From: <pe...@us...> - 2003-09-29 23:17:37
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/targets In directory sc8-pr-cvs1:/tmp/cvs-serv8611/src/java/org/neuclear/id/targets Removed Files: TargetReference.java Log Message: Changes to the senders. Now the senders only work with NamedObjectBuilders which are the only NamedObject representations that contain full XML. --- TargetReference.java DELETED --- |
|
From: <pe...@us...> - 2003-09-29 23:17:37
|
Update of /cvsroot/neuclear/neuclear-id/src/webapp
In directory sc8-pr-cvs1:/tmp/cvs-serv8611/src/webapp
Modified Files:
login.jsp
Log Message:
Changes to the senders. Now the senders only work with NamedObjectBuilders
which are the only NamedObject representations that contain full XML.
Index: login.jsp
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/webapp/login.jsp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** login.jsp 26 Sep 2003 23:53:10 -0000 1.4
--- login.jsp 29 Sep 2003 23:17:32 -0000 1.5
***************
*** 4,8 ****
java.util.Date,
org.neudist.xml.xmlsec.XMLSecTools,
! org.neuclear.id.targets.TargetReference,
org.neudist.utils.ServletTools,
org.neuclear.id.Identity,
--- 4,8 ----
java.util.Date,
org.neudist.xml.xmlsec.XMLSecTools,
!
org.neudist.utils.ServletTools,
org.neuclear.id.Identity,
|
|
From: <pe...@us...> - 2003-09-29 23:17:37
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv8611/src/java/org/neuclear/id
Modified Files:
Identity.java SignedNamedObject.java
Log Message:
Changes to the senders. Now the senders only work with NamedObjectBuilders
which are the only NamedObject representations that contain full XML.
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Identity.java 26 Sep 2003 00:22:06 -0000 1.3
--- Identity.java 29 Sep 2003 23:17:31 -0000 1.4
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/29 23:17:31 pelle
+ * Changes to the senders. Now the senders only work with NamedObjectBuilders
+ * which are the only NamedObject representations that contain full XML.
+ *
* Revision 1.3 2003/09/26 00:22:06 pelle
* Cleanups and final changes to code for refactoring of the Verifier and Reader part.
***************
*** 166,169 ****
--- 170,174 ----
import org.neuclear.senders.Sender;
import org.neuclear.id.resolver.NSResolver;
+ import org.neuclear.id.builders.NamedObjectBuilder;
import java.security.PublicKey;
***************
*** 213,217 ****
}
! public final void send(SignedNamedObject obj) throws NeudistException {
if (!Utility.isEmpty(receiver))
Sender.quickSend(receiver, obj);
--- 218,222 ----
}
! public final void send(NamedObjectBuilder obj) throws NeudistException {
if (!Utility.isEmpty(receiver))
Sender.quickSend(receiver, obj);
***************
*** 220,224 ****
}
! void log(SignedNamedObject obj) throws NeudistException {
if (!Utility.isEmpty(logger))
Sender.quickSend(logger, obj);
--- 225,229 ----
}
! void log(NamedObjectBuilder obj) throws NeudistException {
if (!Utility.isEmpty(logger))
Sender.quickSend(logger, obj);
***************
*** 231,250 ****
return pubs;
}
! private String repository;
! private String signer;
! private String logger;
! private String receiver;
! private PublicKey pubs[];
! public final static Identity getRootIdentity() throws NeudistException {
- PublicKey rootpk=CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP);
- root=new Identity("neu://",null,new Timestamp(0),null,NSResolver.NSROOTSTORE,
- null,null,null,new PublicKey[]{rootpk});
- return root;
}
! private static Identity root;
/**
--- 236,261 ----
return pubs;
}
! private final String repository;
! private final String signer;
! private final String logger;
! private final String receiver;
! private final PublicKey pubs[];
!
! private final static Identity createRootIdentity() {
+ try {
+ PublicKey rootpk=CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP);
+ return new Identity("neu://",null,new Timestamp(0),null,NSResolver.NSROOTSTORE,
+ null,null,null,new PublicKey[]{rootpk});
+ } catch (NeudistException e) {
+ e.printStackTrace();
! return null;
! }
}
!
! public static final Identity NEUROOT=createRootIdentity();
/**
***************
*** 284,286 ****
--- 295,300 ----
}
+ public static void main(String args[]){
+
+ }
}
Index: SignedNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedObject.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SignedNamedObject.java 24 Sep 2003 23:56:48 -0000 1.1
--- SignedNamedObject.java 29 Sep 2003 23:17:31 -0000 1.2
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/09/29 23:17:31 pelle
+ * Changes to the senders. Now the senders only work with NamedObjectBuilders
+ * which are the only NamedObject representations that contain full XML.
+ *
* Revision 1.1 2003/09/24 23:56:48 pelle
* Refactoring nearly done. New model for creating signed objects.
***************
*** 185,193 ****
}
- public final void log() throws NeudistException {
- Identity ns = getSignatory();
- ns.log(this);
- }
-
public Identity getSignatory() {
return signer;
--- 189,192 ----
***************
*** 197,204 ****
return digest;
}
! private String name;
! private Identity signer;
! private Timestamp timestamp;
! private String digest;
final public static class Reader implements NamedObjectReader {
--- 196,203 ----
return digest;
}
! private final String name;
! private final Identity signer;
! private final Timestamp timestamp;
! private final String digest;
final public static class Reader implements NamedObjectReader {
|
|
From: <pe...@us...> - 2003-09-29 23:17:37
|
Update of /cvsroot/neuclear/neuclear-id In directory sc8-pr-cvs1:/tmp/cvs-serv8611 Modified Files: project.properties Log Message: Changes to the senders. Now the senders only work with NamedObjectBuilders which are the only NamedObject representations that contain full XML. Index: project.properties =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/project.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** project.properties 26 Sep 2003 23:53:10 -0000 1.2 --- project.properties 29 Sep 2003 23:17:31 -0000 1.3 *************** *** 18,21 **** maven.repo.remote = http://www.ibiblio.org/maven/,http://dist.codehaus.org/ ! maven.test.skip=true maven.uberjar.main = org.neuclear.signers.commandline.CommandLineSigner --- 18,21 ---- maven.repo.remote = http://www.ibiblio.org/maven/,http://dist.codehaus.org/ ! maven.test.skip=false maven.uberjar.main = org.neuclear.signers.commandline.CommandLineSigner |
|
From: <pe...@us...> - 2003-09-29 23:17:36
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver
In directory sc8-pr-cvs1:/tmp/cvs-serv8611/src/java/org/neuclear/id/resolver
Modified Files:
NSResolver.java
Log Message:
Changes to the senders. Now the senders only work with NamedObjectBuilders
which are the only NamedObject representations that contain full XML.
Index: NSResolver.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver/NSResolver.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** NSResolver.java 26 Sep 2003 23:53:10 -0000 1.5
--- NSResolver.java 29 Sep 2003 23:17:31 -0000 1.6
***************
*** 32,36 ****
String store = NSROOTSTORE;
if (parentname == null || parentname.equals("neu://"))
! return Identity.getRootIdentity();
Identity parent = resolveIdentity(parentname);
store = parent.getRepository();
--- 32,36 ----
String store = NSROOTSTORE;
if (parentname == null || parentname.equals("neu://"))
! return Identity.NEUROOT;
Identity parent = resolveIdentity(parentname);
store = parent.getRepository();
|
|
From: <pe...@us...> - 2003-09-29 21:55:32
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders
In directory sc8-pr-cvs1:/tmp/cvs-serv3423/src/java/org/neuclear/senders
Modified Files:
Sender.java
Log Message:
Added Builders to create named objects from scratch.
Index: Sender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/Sender.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Sender.java 24 Sep 2003 23:56:48 -0000 1.2
--- Sender.java 27 Sep 2003 19:23:11 -0000 1.3
***************
*** 2,5 ****
--- 2,6 ----
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.id.builders.NamedObjectBuilder;
import org.neudist.utils.NeudistException;
***************
*** 31,37 ****
*/
public abstract class Sender {
! public abstract void send(String endpoint, SignedNamedObject obj) throws NeudistException;
! public static void quickSend(String receiver, SignedNamedObject obj) {
}
}
--- 32,38 ----
*/
public abstract class Sender {
! public abstract void send(String endpoint, NamedObjectBuilder obj) throws NeudistException;
! public static void quickSend(String receiver, NamedObjectBuilder obj) {
}
}
|
|
From: <pe...@us...> - 2003-09-29 21:55:31
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/verifier In directory sc8-pr-cvs1:/tmp/cvs-serv3423/src/test/org/neuclear/id/verifier Added Files: VerificationTest.java Log Message: Added Builders to create named objects from scratch. --- NEW FILE: VerificationTest.java --- package org.neuclear.id.verifier; import junit.framework.TestCase; import org.dom4j.DocumentException; import org.dom4j.Document; import org.dom4j.io.SAXReader; import org.neudist.utils.NeudistException; import org.neudist.utils.RegexFileNameFilter; import org.neudist.xml.xmlsec.XMLSecTools; import org.neuclear.id.SignedNamedObject; 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: VerificationTest.java,v 1.1 2003/09/27 19:23:11 pelle Exp $ $Log: VerificationTest.java,v $ Revision 1.1 2003/09/27 19:23:11 pelle Added Builders to create named objects from scratch. */ /** * * User: pelleb * Date: Sep 27, 2003 * Time: 11:38:01 AM */ public class VerificationTest extends TestCase { public VerificationTest(String string) { super(string); reader=VerifyingReader.getInstance(); } public void testSimple() throws IOException, DocumentException, NeudistException { runDirectoryTest("src/testdata/simple"); } public void runDirectoryTest(String path) throws DocumentException, IOException, FileNotFoundException, NeudistException { 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(".neu"); } }; 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("Name : "+obj.getName()+" VERIFIED"); } catch (Exception e) { System.out.println("ERROR "+e.getMessage()); assertTrue(false); } } } VerifyingReader reader; } |
|
From: <pe...@us...> - 2003-09-29 21:20:24
|
Update of /cvsroot/neuclear/neuclear-id/src/testdata In directory sc8-pr-cvs1:/tmp/cvs-serv8809/src/testdata Log Message: Directory /cvsroot/neuclear/neuclear-id/src/testdata added to the repository |
|
From: <bug...@ve...> - 2003-09-29 21:12:11
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://devone.veraxpay.com:9090/secure/ViewIssue.jspa?key=NEU-5 Here is an overview of the issue: --------------------------------------------------------------------- Key: NEU-5 Summary: Reworking of NeudistException Type: Improvement Status: Assigned Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Identity Fix Fors: 0.7 Versions: 0.7 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Fri, 26 Sep 2003 6:44 PM Updated: Fri, 26 Sep 2003 6:44 PM Description: NeudistException is not granular enough to be of much use. I want to replace it with the advances made within the payment code. Introduce LowLevelExceptions etc. --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://devone.veraxpay.com:9090/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
|
From: <pe...@us...> - 2003-09-28 02:24:18
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders In directory sc8-pr-cvs1:/tmp/cvs-serv3423/src/java/org/neuclear/id/builders Added Files: IdentityBuilder.java NamedObjectBuilder.java TargetReference.java Log Message: Added Builders to create named objects from scratch. --- NEW FILE: IdentityBuilder.java --- /* * $Id: IdentityBuilder.java,v 1.1 2003/09/27 19:23:11 pelle Exp $ * $Log: IdentityBuilder.java,v $ * Revision 1.1 2003/09/27 19:23:11 pelle * Added Builders to create named objects from scratch. * * Revision 1.11 2003/02/18 14:57:18 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.10 2003/02/18 00:06:15 pelle * Moved the SignerStore's into xml-sig * * Revision 1.9 2003/02/16 00:22:59 pelle * LogSender now works and there is a corresponding server side cgi script to do the logging in * http://neudist.org/logger/ Site is not yet up but will be soon. * * Revision 1.8 2003/02/14 21:10:29 pelle * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. * The NamedObject has a new log() method that logs it's contents at it's parent NameSpace's logger. * The NameSpace object also has a new method send() which allows one to send a named object to the NameSpace's * default receiver. * * Revision 1.7 2003/02/10 22:30:05 pelle * Got rid of even further dependencies. In Particular OSCore * * Revision 1.6 2003/02/09 00:15:52 pelle * Fixed things so they now compile with r_0.7 of XMLSig * * Revision 1.5 2003/01/16 22:20:02 pelle * First Draft of new generalised Ledger Interface. * Currently we have a Book and Transaction class. * We also need a Ledger class and a Ledger Factory. * * Revision 1.4 2002/12/17 21:40:54 pelle * First part of refactoring of NamedObject and SignedObject Interface/Class parings. * * Revision 1.3 2002/12/17 20:34:39 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 NamedObject. * Then there is the veriifer, which verifies a given NamedObject using the NSResolver. * This has simplified the NamedObject 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.2 2002/10/02 21:03:44 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.1.1 2002/09/18 10:55:42 pelle * First release in new CVS structure. * Also first public release. * This implemnts simple named objects. * - NameSpace Objects * - NSAuth Objects * * Storage systems * - In Memory Storage * - Clear text file based storage * - Encrypted File Storage (with SHA256 digested filenames) * - CachedStorage * - SoapStorage * * Simple SOAP client/server * - Simple Single method call SOAP client, for arbitrary dom4j based requests * - Simple Abstract SOAP Servlet for implementing http based SOAP Servers * * Simple XML-Signature Implementation * - Based on dom4j * - SHA-RSA only * - Very simple (likely imperfect) highspeed canonicalizer * - Zero support for X509 (We dont like that anyway) * - Super Simple * * * Revision 1.5 2002/06/18 03:04:11 pelle * Just added all the necessary jars. * Fixed a few things in the framework and * started a GUI Application to manage Neu's. * * Revision 1.4 2002/06/17 20:48:33 pelle * The NS functionality should now work. FileStore is working properly. * The example .ns objects in the neuspace folder have been updated with the * latest version of the format. * "neuspace/root.ns" should now be considered the universal parent of the * neudist system. * Still more to go, but we're getting there. I will now focus on a quick * Web interface. After which Contracts will be added. * * Revision 1.3 2002/06/13 19:04:07 pelle * A start to a web interface into the architecture. * We're getting a bit further now with functionality. * * Revision 1.2 2002/06/05 23:42:04 pelle * The Throw clauses of several method definitions were getting out of hand, so I have * added a new wrapper exception NeudistException, to keep things clean in the ledger. * This is used as a catchall wrapper for all Exceptions in the underlying API's such as IOExceptions, * XML Exceptions etc. * You can catch any Exception and rethrow it using Utility.rethrowException(e) as a quick way of handling * exceptions. * Otherwise the Store framework and the NameSpaces are really comming along quite well. I added a CachedStore * which wraps around any other Store and caches the access to the store. * * Revision 1.1.1.1 2002/05/29 10:02:22 pelle * Lets try one more time. This is the first rev of the next gen of Neudist * * */ package org.neuclear.id.builders; import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.dom4j.QName; import org.neudist.utils.NeudistException; import org.neudist.utils.Utility; import org.neudist.xml.xmlsec.KeyInfo; import org.neudist.xml.xmlsec.XMLSecTools; import java.security.PublicKey; import java.util.Iterator; import java.util.List; public final class IdentityBuilder extends NamedObjectBuilder { /** * This constructor should be used by subclasses of NameSpace. It creates a Standard NameSpace document, but doesn't sign it. * The signing should be done as the last step of the constructor of the subclass. * @param name The Name of NameSpace * @param allow PublicKey allowed to sign in here * @param repository URL of Default Store for NameSpace. (Note. A NameSpace 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 NeudistException */ public IdentityBuilder(String name,PublicKey allow,String repository,String signer,String logger,String receiver) throws NeudistException { super(name,"NameSpace"); Element root=getElement(); // We have meaningful defaults for the following two root.addAttribute(DocumentHelper.createQName("repository",NamedObjectBuilder.NS_NSDL),repository); root.addAttribute(DocumentHelper.createQName("logger",NamedObjectBuilder.NS_NSDL),receiver); if (!Utility.isEmpty(signer)) root.addAttribute(DocumentHelper.createQName("signer",NamedObjectBuilder.NS_NSDL),signer); if (!Utility.isEmpty(receiver)) root.addAttribute(DocumentHelper.createQName("receiver",NamedObjectBuilder.NS_NSDL),receiver); if (allow!=null) { QName allowName=DocumentHelper.createQName("allow",NamedObjectBuilder.NS_NSDL); Element pub=root.addElement(allowName); pub.add(XMLSecTools.createKeyInfo(allow)); } } public IdentityBuilder(String name,PublicKey allow,String repository) throws NeudistException { this(name,allow,repository,null,null,null); } public IdentityBuilder(String name,PublicKey allow) throws NeudistException { this(name,allow,null); } public String getTagName() { return "NameSpace"; } } --- NEW FILE: NamedObjectBuilder.java --- /* * $Id: NamedObjectBuilder.java,v 1.1 2003/09/27 19:23:11 pelle Exp $ * $Log: NamedObjectBuilder.java,v $ * Revision 1.1 2003/09/27 19:23:11 pelle * Added Builders to create named objects from scratch. * * Revision 1.13 2003/02/18 14:57:19 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/14 21:10:30 pelle * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. * The NamedObject has a new log() method that logs it's contents at it's parent NameSpace's logger. * The NameSpace object also has a new method send() which allows one to send a named object to the NameSpace's * default receiver. * * Revision 1.11 2003/02/14 14:04:29 pelle * The New Source Classes work and NS resolution works as well. * I've renamed Target to TargetReference to prepare for the other main refactoring ahead. Implementation of * Senders. * * Revision 1.10 2003/02/10 22:30:06 pelle * Got rid of even further dependencies. In Particular OSCore * * Revision 1.9 2003/02/09 00:15:52 pelle * Fixed things so they now compile with r_0.7 of XMLSig * * Revision 1.8 2002/12/17 21:53:28 pelle * Final changes for refactoring. * * Revision 1.7 2002/12/17 20:34:39 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 NamedObject. * Then there is the veriifer, which verifies a given NamedObject using the NSResolver. * This has simplified the NamedObject 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.6 2002/10/03 01:51:58 pelle * Bunch of smaller fixes for bugs found during deployment. * Also a bit more documentation. * I'm happy with this being called rev. 0.4 * * Revision 1.5 2002/10/02 21:03:44 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.4 2002/09/25 19:20:15 pelle * Added various new schemas and updated most of the existing ones. * Added explanation interface for explaining the purpose of a * NamedObject to a user. We may want to use XSL instead. * Also made the signing webapp look a bit nicer. * * Revision 1.3 2002/09/21 23:11:13 pelle * A bunch of clean ups. Got rid of as many hard coded URL's as I could. * * Revision 1.2 2002/09/20 01:15:18 pelle * Added prototype webapplication under src/java * SOAPServlet appears to work * Any webservices taking named objects should subclass from ReceiverServlet * SigningServlet is not completely working right now, but * will be the main prototype of a web based signer. * * Other new features are GenericNamedObject for simple instantiation of * arbitrary named objects. * * Revision 1.1.1.1 2002/09/18 10:55:40 pelle * First release in new CVS structure. * Also first public release. * This implemnts simple named objects. * - NameSpace Objects * - NSAuth Objects * * Storage systems * - In Memory Storage * - Clear text file based storage * - Encrypted File Storage (with SHA256 digested filenames) * - CachedStorage * - SoapStorage * * Simple SOAP client/server * - Simple Single method call SOAP client, for arbitrary dom4j based requests * - Simple Abstract SOAP Servlet for implementing http based SOAP Servers * * Simple XML-Signature Implementation * - Based on dom4j * - SHA-RSA only * - Very simple (likely imperfect) highspeed canonicalizer * - Zero support for X509 (We dont like that anyway) * - Super Simple * * * Revision 1.1.1.1 2002/05/29 10:02:22 pelle * Lets try one more time. This is the first rev of the next gen of Neudist * * */ package org.neuclear.id.builders; import org.dom4j.*; import org.neuclear.time.TimeTools; import org.neudist.utils.NeudistException; import org.neudist.utils.Utility; import org.neudist.xml.AbstractElementProxy; import org.neudist.xml.XMLException; import org.neudist.xml.xmlsec.SignedElement; import org.neudist.xml.xmlsec.XMLSecTools; import org.neudist.xml.xmlsec.XMLSecurityException; import org.neuclear.id.Named; import org.neuclear.id.NSTools; import org.neuclear.id.Identity; import org.neuclear.id.resolver.NSResolver; import org.neuclear.senders.Sender; import java.sql.Timestamp; import java.util.Iterator; import java.util.LinkedList; import java.util.List; /** * This simple wrapper takes most of the contents of a NamedObject and puts it into a Serializable form that can be signed. */ public abstract class NamedObjectBuilder extends SignedElement implements Named { public NamedObjectBuilder(String name,String tagName, String prefix, String nsURI) { super(tagName, prefix, nsURI); createDocument(); setName(name); } public NamedObjectBuilder(String name,String tagName, Namespace ns) { super(tagName, ns); createDocument(); setName(name); } public NamedObjectBuilder(String name,String tagName) { super(tagName,NamedObjectBuilder.NS_NSDL); createDocument(); setName(name); } public NamedObjectBuilder(String name,QName qname) { super(qname); createDocument(); setName(name); } /** * The full name (URI) of an object * @return String containing the fully qualified URI of an object */ public String getName() throws NeudistException{ return NSTools.normalizeNameURI(getElement().attributeValue(getNameAttrQName())); } /** * The Name of an object within it's parent NameSpace * @return Parent Name */ public String getLocalName() throws NeudistException{ String fullName=getName(); int i=fullName.lastIndexOf('/'); return fullName.substring(i+1); } private void setName(String name) { getElement().addAttribute(getNameAttrQName(),name); } private static QName getNameAttrQName() { return DocumentHelper.createQName("name",NamedObjectBuilder.NS_NSDL); } private void createDocument() { Element elem=getElement(); if(elem.getDocument()==null) { Document doc=DocumentHelper.createDocument(elem); } } /** * @return the URI of the object. In this case the same as getName(); */ public final String getURI() throws XMLSecurityException { try { return getName(); } catch (NeudistException e) { XMLSecTools.rethrowException(e); //To change body of catch statement use Options | File Templates. } return null; } /** * @return the XML NameSpace object */ public Namespace getNS() { return NamedObjectBuilder.NS_NSDL; } protected void addElement(NamedObjectBuilder child) throws XMLException { addElement((AbstractElementProxy)child); } /** * Sign NamedObject using given PrivateKey. This also adds a timestamp to the root element prior to signing */ protected final void preSign() throws XMLSecurityException{ // We need to timestamp it before we sign it getElement().addAttribute(DocumentHelper.createQName("timestamp",NamedObjectBuilder.NS_NSDL),TimeTools.createTimeStamp()); } /** * This is called after signing to handle any post signing tasks such as logging * @throws XMLSecurityException */ protected void postSign() throws XMLSecurityException { try { log(); } catch (NeudistException e) { XMLSecTools.rethrowException(e); } } /** * Adds a TargetReference to a NamedObject.<br> * This can only be done if the object isn't signed. * @param target object */ public void addTarget(TargetReference target) throws NeudistException { if (target==null) return; QName targetsQN=DocumentHelper.createQName("Targets",NamedObjectBuilder.NS_NSDL); Element targetsElem=getElement().element(targetsQN); if (targetsElem==null){ targetsElem=DocumentHelper.createElement(targetsQN); getElement().add(targetsElem); } targetsElem.add(target.getElement()); targetList().add(target); } private synchronized List targetList() { if (targets==null) targets=new LinkedList(); return targets; } /** * Lists the targets within an object * @return Iterator of targets */ public Iterator listTargets() throws NeudistException { return targetList().iterator(); } /** * Sends copy of object to all targets within */ public void sendObject() throws NeudistException{ System.out.println("NEUDIST: Sending Object "+getName()); if (this.isSigned()) { Iterator iter=listTargets(); while(iter.hasNext()) { TargetReference tg=((TargetReference)iter.next()); tg.send(); System.out.println("NEUDIST: Sent to "+tg.getHref()); } } } public Timestamp getTimeStamp() throws NeudistException { String timeString=getElement().attributeValue(DocumentHelper.createQName("timestamp",NamedObjectBuilder.NS_NSDL)); if (isSigned()&&!Utility.isEmpty(timeString)){ try { return TimeTools.parseTimeStamp(timeString); } catch (NeudistException e) { return null; } } return null; } public final void log() throws NeudistException { Identity ns = getParent(); Sender.quickSend(ns.getLogger(),this); } public Identity getParent() throws NeudistException { Identity ns=NSResolver.resolveIdentity(NSTools.getParentNSURI(getName())); return ns; } private List targets; public static final String NSDL_NAMESPACE="http://neudist.org/neu/nsdl"; public static final Namespace NS_NSDL=DocumentHelper.createNamespace("nsdl",NamedObjectBuilder.NSDL_NAMESPACE); public static final String NSDL_PREFIX="nsdl:"; } --- NEW FILE: TargetReference.java --- /* * $Id: TargetReference.java,v 1.1 2003/09/27 19:23:11 pelle Exp $ * $Log: TargetReference.java,v $ * Revision 1.1 2003/09/27 19:23:11 pelle * Added Builders to create named objects from scratch. * * Revision 1.3 2003/02/18 14:57:19 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.2 2003/02/14 21:10:33 pelle * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. * The NamedObject has a new log() method that logs it's contents at it's parent NameSpace's logger. * The NameSpace object also has a new method send() which allows one to send a named object to the NameSpace's * default receiver. * * Revision 1.1 2003/02/14 14:04:59 pelle * The New Source Classes work and NS resolution works as well. * I've renamed Target to TargetReference to prepare for the other main refactoring ahead. Implementation of * Senders. * * Revision 1.5 2003/02/10 22:30:12 pelle * Got rid of even further dependencies. In Particular OSCore * * Revision 1.4 2003/02/09 00:15:55 pelle * Fixed things so they now compile with r_0.7 of XMLSig * * Revision 1.3 2002/09/21 23:11:16 pelle * A bunch of clean ups. Got rid of as many hard coded URL's as I could. * * User: pelleb * Date: Sep 14, 2002 * Time: 3:29:03 PM * To change template for new class use * Code Style | Class Templates options (Tools | IDE Options). */ package org.neuclear.id.builders; import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.dom4j.Namespace; //import org.neudist.ns.NamedObject; import org.neuclear.senders.Sender; import org.neudist.utils.NeudistException; import org.neudist.utils.Utility; import org.neudist.xml.AbstractElementProxy; import org.neuclear.senders.Sender; public class TargetReference extends AbstractElementProxy { public TargetReference(NamedObjectBuilder obj, Element elem) throws NeudistException{ super(elem); if (!elem.getName().equals(TAG_NAME)) throw new NeudistException("Element is not a <Target/> Element"); owner=obj; } public TargetReference(NamedObjectBuilder obj,String href,String type) { super(DocumentHelper.createQName(TAG_NAME,NamedObjectBuilder.NS_NSDL)); if (!Utility.isEmpty(href)) getElement().addAttribute(DocumentHelper.createQName("href",NamedObjectBuilder.NS_NSDL),href); if (!Utility.isEmpty(type)) getElement().addAttribute(DocumentHelper.createQName("type",NamedObjectBuilder.NS_NSDL),type); owner=obj; } public String getHref() { return getElement().attributeValue(DocumentHelper.createQName("href",NamedObjectBuilder.NS_NSDL)); } public String getType() { return getElement().attributeValue(DocumentHelper.createQName("type",NamedObjectBuilder.NS_NSDL)); } private static final String TAG_NAME="Target"; public String getTagName() { return TAG_NAME; } public Namespace getNS() { return NamedObjectBuilder.NS_NSDL; } public void send() throws NeudistException { Sender.quickSend(getHref(),owner); } private NamedObjectBuilder owner; } |
|
From: <pe...@us...> - 2003-09-28 00:29:22
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders In directory sc8-pr-cvs1:/tmp/cvs-serv6351/src/java/org/neuclear/id/builders Log Message: Directory /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders added to the repository |