You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(119) |
Oct
(111) |
Nov
(238) |
Dec
(395) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(239) |
Feb
(59) |
Mar
(354) |
Apr
(489) |
May
(23) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(5) |
Jun
(2) |
Jul
|
Aug
|
Sep
(3) |
Oct
(14) |
Nov
(17) |
Dec
(9) |
| 2007 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(7) |
May
(3) |
Jun
(6) |
Jul
(4) |
Aug
(3) |
Sep
(15) |
Oct
(13) |
Nov
(35) |
Dec
(40) |
| 2009 |
Jan
(19) |
Feb
(21) |
Mar
(16) |
Apr
(18) |
May
(36) |
Jun
(20) |
Jul
(32) |
Aug
(11) |
Sep
(3) |
Oct
(2) |
Nov
(2) |
Dec
(13) |
| 2010 |
Jan
(5) |
Feb
(5) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(3) |
| 2012 |
Jan
(3) |
Feb
(3) |
Mar
(1) |
Apr
(4) |
May
(8) |
Jun
(4) |
Jul
(9) |
Aug
(2) |
Sep
(8) |
Oct
(3) |
Nov
(8) |
Dec
(4) |
| 2013 |
Jan
(2) |
Feb
(1) |
Mar
(5) |
Apr
(6) |
May
(10) |
Jun
(5) |
Jul
(6) |
Aug
(7) |
Sep
(5) |
Oct
(2) |
Nov
(4) |
Dec
(4) |
| 2014 |
Jan
(13) |
Feb
(4) |
Mar
(7) |
Apr
(9) |
May
(20) |
Jun
(13) |
Jul
(10) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(2) |
Dec
(2) |
| 2015 |
Jan
(3) |
Feb
(3) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(3) |
Nov
(4) |
Dec
(2) |
| 2017 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <pe...@us...> - 2003-09-24 23:56:57
|
Update of /cvsroot/neuclear/neuclear-id/src/webapp
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/webapp
Modified Files:
index.jsp
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: index.jsp
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/webapp/index.jsp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** index.jsp 23 Sep 2003 19:16:30 -0000 1.3
--- index.jsp 24 Sep 2003 23:56:49 -0000 1.4
***************
*** 2,6 ****
com.opensymphony.util.TextUtils,
org.neuclear.receiver.ReceiverServlet,
! org.neuclear.id.NamedObject,
org.neuclear.contracts.nsauth.AuthenticationTicket,
org.neuclear.id.NSTools,
--- 2,6 ----
com.opensymphony.util.TextUtils,
org.neuclear.receiver.ReceiverServlet,
! org.neuclear.id.SignedNamedObject,
org.neuclear.contracts.nsauth.AuthenticationTicket,
org.neuclear.id.NSTools,
***************
*** 22,26 ****
String ticketname=(String)sess.getAttribute("nsauth");
if (ticket==null&&!Utility.isEmpty(ticketname)) {
! NamedObject named=NamedObjectFactory.fetchNamedObject(ticketname);
if (named!=null){
if (named instanceof AuthenticationTicket) {
--- 22,26 ----
String ticketname=(String)sess.getAttribute("nsauth");
if (ticket==null&&!Utility.isEmpty(ticketname)) {
! SignedNamedObject named=NamedObjectFactory.fetchNamedObject(ticketname);
if (named!=null){
if (named instanceof AuthenticationTicket) {
|
|
From: <pe...@us...> - 2003-09-24 23:56:57
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/store
Modified Files:
EncryptedFileStore.java FileStore.java Store.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: EncryptedFileStore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/EncryptedFileStore.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** EncryptedFileStore.java 23 Sep 2003 19:16:29 -0000 1.3
--- EncryptedFileStore.java 24 Sep 2003 23:56:49 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:49 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:29 pelle
* Changed NameSpace to Identity.
***************
*** 124,128 ****
import org.dom4j.DocumentHelper;
import org.neuclear.id.NSTools;
! import org.neuclear.id.NamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neudist.crypto.CryptoTools;
--- 133,137 ----
import org.dom4j.DocumentHelper;
import org.neuclear.id.NSTools;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neudist.crypto.CryptoTools;
***************
*** 144,148 ****
}
! protected void rawStore(NamedObject obj) throws IOException, NeudistException {
String outputFilename = base + getFileName(obj);
System.out.println("Outputting to: " + outputFilename);
--- 153,157 ----
}
! protected void rawStore(SignedNamedObject obj) throws IOException, NeudistException {
String outputFilename = base + getFileName(obj);
System.out.println("Outputting to: " + outputFilename);
***************
*** 159,163 ****
}
! protected NamedObject fetch(String name) throws NeudistException {
String deURLizedName = NSTools.normalizeNameURI(name);
String inputFilename = base + getFileName(deURLizedName);
--- 168,172 ----
}
! protected SignedNamedObject fetch(String name) throws NeudistException {
String deURLizedName = NSTools.normalizeNameURI(name);
String inputFilename = base + getFileName(deURLizedName);
***************
*** 167,171 ****
return null;
! NamedObject ns = null;
try {
byte input[] = new byte[(int) fin.length()];
--- 176,180 ----
return null;
! SignedNamedObject ns = null;
try {
byte input[] = new byte[(int) fin.length()];
***************
*** 212,216 ****
}
! protected static String getFileName(NamedObject obj) throws NeudistException {
return getFileName(obj.getName());
}
--- 221,225 ----
}
! protected static String getFileName(SignedNamedObject obj) throws NeudistException {
return getFileName(obj.getName());
}
Index: FileStore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/FileStore.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** FileStore.java 23 Sep 2003 19:16:29 -0000 1.3
--- FileStore.java 24 Sep 2003 23:56:49 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:49 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:29 pelle
* Changed NameSpace to Identity.
***************
*** 110,114 ****
import org.dom4j.Document;
import org.neuclear.id.NSTools;
! import org.neuclear.id.NamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neudist.utils.NeudistException;
--- 119,123 ----
import org.dom4j.Document;
import org.neuclear.id.NSTools;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neudist.utils.NeudistException;
***************
*** 131,135 ****
}
! protected void rawStore(NamedObject obj) throws IOException, NeudistException {
String outputFilename = base + getFileName(obj);
System.out.println("Outputting to: " + outputFilename);
--- 140,144 ----
}
! protected void rawStore(SignedNamedObject obj) throws IOException, NeudistException {
String outputFilename = base + getFileName(obj);
System.out.println("Outputting to: " + outputFilename);
***************
*** 143,147 ****
// }
! protected NamedObject fetch(String name) throws NeudistException {
String inputFilename = base + getFileName(NSTools.normalizeNameURI(name));
System.out.println("Loading from: " + inputFilename);
--- 152,156 ----
// }
! protected SignedNamedObject fetch(String name) throws NeudistException {
String inputFilename = base + getFileName(NSTools.normalizeNameURI(name));
System.out.println("Loading from: " + inputFilename);
***************
*** 150,158 ****
return null;
! NamedObject ns = null;
try {
Document doc = XMLTools.loadDocument(new FileInputStream(fin));
ns = NamedObjectFactory.createNamedObject(doc);
! // System.out.println("NEUDIST: Fetched NamedObject tag:"+rootName.getName()+" URI:"+rootName.getNamespaceURI());
// } catch (ParserConfigurationException e) {
// Utility.rethrowException(e);
--- 159,167 ----
return null;
! SignedNamedObject ns = null;
try {
Document doc = XMLTools.loadDocument(new FileInputStream(fin));
ns = NamedObjectFactory.createNamedObject(doc);
! // System.out.println("NEUDIST: Fetched SignedNamedObject tag:"+rootName.getName()+" URI:"+rootName.getNamespaceURI());
// } catch (ParserConfigurationException e) {
// Utility.rethrowException(e);
***************
*** 175,179 ****
}
! protected static String getFileName(NamedObject obj) throws NeudistException {
return getFileName(obj.getName());
// if (! (obj instanceof Identity))
--- 184,188 ----
}
! protected static String getFileName(SignedNamedObject obj) throws NeudistException {
return getFileName(obj.getName());
// if (! (obj instanceof Identity))
Index: Store.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/Store.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Store.java 23 Sep 2003 19:16:29 -0000 1.3
--- Store.java 24 Sep 2003 23:56:49 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:49 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:29 pelle
* Changed NameSpace to Identity.
***************
*** 38,42 ****
*
* Revision 1.5 2002/12/17 21:41:00 pelle
! * First part of refactoring of NamedObject and SignedObject Interface/Class parings.
*
* Revision 1.4 2002/12/17 20:34:42 pelle
--- 47,51 ----
*
* Revision 1.5 2002/12/17 21:41:00 pelle
! * First part of refactoring of SignedNamedObject and SignedObject Interface/Class parings.
*
* Revision 1.4 2002/12/17 20:34:42 pelle
***************
*** 45,51 ****
* 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.
--- 54,60 ----
* on it before I'm happy.
* There is now a NSResolver class, which handles all the namespace resolution. I took most of the functionality
! * for this out of SignedNamedObject.
! * Then there is the veriifer, which verifies a given SignedNamedObject using the NSResolver.
! * This has simplified the SignedNamedObject classes drastically, leaving them as mainly data objects, which is what they
* should be.
* I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate.
***************
*** 119,123 ****
import org.neuclear.id.InvalidIdentityException;
! import org.neuclear.id.NamedObject;
import org.neuclear.id.verifier.NSVerifier;
import org.neuclear.receiver.Receiver;
--- 128,132 ----
import org.neuclear.id.InvalidIdentityException;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.verifier.NSVerifier;
import org.neuclear.receiver.Receiver;
***************
*** 133,137 ****
* This handles the Identity checking on the object.
*/
! public final void receive(NamedObject obj) throws InvalidIdentityException, NeudistException {
try {
// Dont allow overwrites
--- 142,146 ----
* This handles the Identity checking on the object.
*/
! public final void receive(SignedNamedObject obj) throws InvalidIdentityException, NeudistException {
try {
// Dont allow overwrites
***************
*** 161,165 ****
* Override this for each specific Store type
*/
! protected void rawStore(NamedObject obj) throws IOException, NeudistException {
;
}
--- 170,174 ----
* Override this for each specific Store type
*/
! protected void rawStore(SignedNamedObject obj) throws IOException, NeudistException {
;
}
|
|
From: <pe...@us...> - 2003-09-24 23:56:57
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/signers/servlet
Modified Files:
DemoSigningServlet.java SigningServlet.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: DemoSigningServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet/DemoSigningServlet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DemoSigningServlet.java 23 Sep 2003 19:16:29 -0000 1.3
--- DemoSigningServlet.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:29 pelle
* Changed NameSpace to Identity.
***************
*** 32,36 ****
* Revision 1.5 2003/02/14 21:10:36 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 Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 41,45 ----
* Revision 1.5 2003/02/14 21:10:36 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 83,87 ****
* 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.
*
--- 92,96 ----
* Added various new schemas and updated most of the existing ones.
* Added explanation interface for explaining the purpose of a
! * SignedNamedObject to a user. We may want to use XSL instead.
* Also made the signing webapp look a bit nicer.
*
Index: SigningServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet/SigningServlet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SigningServlet.java 23 Sep 2003 19:16:29 -0000 1.3
--- SigningServlet.java 24 Sep 2003 23:56:49 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:49 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:29 pelle
* Changed NameSpace to Identity.
***************
*** 29,33 ****
* Revision 1.15 2003/02/14 21:10:36 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 Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 38,42 ----
* Revision 1.15 2003/02/14 21:10:36 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 40,44 ****
*
* Revision 1.12 2002/12/17 21:40:59 pelle
! * First part of refactoring of NamedObject and SignedObject Interface/Class parings.
*
* Revision 1.11 2002/12/17 20:34:42 pelle
--- 49,53 ----
*
* Revision 1.12 2002/12/17 21:40:59 pelle
! * First part of refactoring of SignedNamedObject and SignedObject Interface/Class parings.
*
* Revision 1.11 2002/12/17 20:34:42 pelle
***************
*** 47,53 ****
* 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.
--- 56,62 ----
* on it before I'm happy.
* There is now a NSResolver class, which handles all the namespace resolution. I took most of the functionality
! * for this out of SignedNamedObject.
! * Then there is the veriifer, which verifies a given SignedNamedObject using the NSResolver.
! * This has simplified the SignedNamedObject classes drastically, leaving them as mainly data objects, which is what they
* should be.
* I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate.
***************
*** 99,103 ****
* 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.
*
--- 108,112 ----
* Added various new schemas and updated most of the existing ones.
* Added explanation interface for explaining the purpose of a
! * SignedNamedObject to a user. We may want to use XSL instead.
* Also made the signing webapp look a bit nicer.
*
***************
*** 126,130 ****
import org.neuclear.id.InvalidIdentityException;
import org.neuclear.id.NSTools;
! import org.neuclear.id.NamedObject;
import org.neuclear.id.signrequest.SignatureRequest;
import org.neuclear.receiver.ReceiverServlet;
--- 135,139 ----
import org.neuclear.id.InvalidIdentityException;
import org.neuclear.id.NSTools;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.signrequest.SignatureRequest;
import org.neuclear.receiver.ReceiverServlet;
***************
*** 216,220 ****
String passphrase = request.getParameter("passphrase");
SignatureRequest sigreq;
! NamedObject named;
boolean isSigned = false;
Element elem = null;
--- 225,229 ----
String passphrase = request.getParameter("passphrase");
SignatureRequest sigreq;
! SignedNamedObject named;
boolean isSigned = false;
Element elem = null;
***************
*** 302,306 ****
}
! public Element receiveNamedObject(NamedObject obj, String soapAction) throws SOAPException {
try {
signObject(obj, "hello".toCharArray());// TODO How do we get the passphrase here? Popup request?
--- 311,315 ----
}
! public Element receiveNamedObject(SignedNamedObject obj, String soapAction) throws SOAPException {
try {
signObject(obj, "hello".toCharArray());// TODO How do we get the passphrase here? Popup request?
***************
*** 317,321 ****
}
! protected static void signObject(NamedObject obj, char passphrase[]) throws NeudistException, InvalidIdentityException, InvalidPassphraseException, NonExistingSignerException {
if (!obj.isSigned()) {
try {
--- 326,330 ----
}
! protected static void signObject(SignedNamedObject obj, char passphrase[]) throws NeudistException, InvalidIdentityException, InvalidPassphraseException, NonExistingSignerException {
if (!obj.isSigned()) {
try {
|
|
From: <pe...@us...> - 2003-09-24 23:56:57
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/senders
Modified Files:
LogSender.java Sender.java SmtpSender.java SoapSender.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: LogSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/LogSender.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** LogSender.java 23 Sep 2003 19:16:28 -0000 1.3
--- LogSender.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 1,5 ****
package org.neuclear.senders;
! import org.neuclear.id.NamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neuclear.time.TimeTools;
--- 1,5 ----
package org.neuclear.senders;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neuclear.time.TimeTools;
***************
*** 23,26 ****
--- 23,35 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:28 pelle
* Changed NameSpace to Identity.
***************
*** 46,50 ****
* Revision 1.1 2003/02/14 21:10:34 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 Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 55,59 ----
* Revision 1.1 2003/02/14 21:10:34 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 52,56 ****
*/
public class LogSender extends Sender {
! public void send(String endpoint, NamedObject obj) throws NeudistException {
try {
String digest = URLEncoder.encode(Base64.encode(obj.getDigest()), "UTF-8");
--- 61,65 ----
*/
public class LogSender extends Sender {
! public void send(String endpoint, SignedNamedObject obj) throws NeudistException {
try {
String digest = URLEncoder.encode(Base64.encode(obj.getDigest()), "UTF-8");
***************
*** 107,111 ****
}
! public static Timestamp getTimeStamp(NamedObject obj) throws NeudistException {
return getTimeStamp(Utility.denullString(obj.getParent().getLogger(), LOGGER), obj.getDigest());
--- 116,120 ----
}
! public static Timestamp getTimeStamp(SignedNamedObject obj) throws NeudistException {
return getTimeStamp(Utility.denullString(obj.getParent().getLogger(), LOGGER), obj.getDigest());
***************
*** 114,118 ****
private static void logObject(String name) throws NeudistException {
System.out.print("Fetching...");
! NamedObject obj = NamedObjectFactory.fetchNamedObject(name);
System.out.println("Got " + obj.getName());
Sender log = new LogSender();
--- 123,127 ----
private static void logObject(String name) throws NeudistException {
System.out.print("Fetching...");
! SignedNamedObject obj = NamedObjectFactory.fetchNamedObject(name);
System.out.println("Got " + obj.getName());
Sender log = new LogSender();
Index: Sender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/Sender.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Sender.java 22 Sep 2003 19:24:02 -0000 1.1
--- Sender.java 24 Sep 2003 23:56:48 -0000 1.2
***************
*** 1,5 ****
package org.neuclear.senders;
! import org.neuclear.id.NamedObject;
import org.neudist.utils.NeudistException;
--- 1,5 ----
package org.neuclear.senders;
! import org.neuclear.id.SignedNamedObject;
import org.neudist.utils.NeudistException;
***************
*** 31,37 ****
*/
public abstract class Sender {
! public abstract void send(String endpoint, NamedObject obj) throws NeudistException;
! public static void quickSend(String receiver, NamedObject obj) {
}
}
--- 31,37 ----
*/
public abstract class Sender {
! public abstract void send(String endpoint, SignedNamedObject obj) throws NeudistException;
! public static void quickSend(String receiver, SignedNamedObject obj) {
}
}
Index: SmtpSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/SmtpSender.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SmtpSender.java 23 Sep 2003 19:16:28 -0000 1.3
--- SmtpSender.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 8,11 ****
--- 8,20 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:28 pelle
* Changed NameSpace to Identity.
***************
*** 27,31 ****
* Revision 1.1 2003/02/14 21:10:35 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 Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 36,40 ----
* Revision 1.1 2003/02/14 21:10:35 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 33,37 ****
*/
! import org.neuclear.id.NamedObject;
import org.neudist.utils.NeudistException;
import org.neudist.utils.Utility;
--- 42,46 ----
*/
! import org.neuclear.id.SignedNamedObject;
import org.neudist.utils.NeudistException;
import org.neudist.utils.Utility;
***************
*** 46,50 ****
public class SmtpSender extends Sender {
! public void send(String endpoint, NamedObject obj) throws NeudistException {
Properties props = System.getProperties();
if (endpoint.startsWith("mailto:"))
--- 55,59 ----
public class SmtpSender extends Sender {
! public void send(String endpoint, SignedNamedObject 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.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SoapSender.java 23 Sep 2003 19:16:28 -0000 1.3
--- SoapSender.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 8,11 ****
--- 8,20 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:28 pelle
* Changed NameSpace to Identity.
***************
*** 27,31 ****
* Revision 1.1 2003/02/14 21:10:35 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 Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 36,40 ----
* Revision 1.1 2003/02/14 21:10:35 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 33,37 ****
*/
! import org.neuclear.id.NamedObject;
import org.neudist.utils.NeudistException;
import org.neudist.xml.soap.SOAPTools;
--- 42,46 ----
*/
! import org.neuclear.id.SignedNamedObject;
import org.neudist.utils.NeudistException;
import org.neudist.xml.soap.SOAPTools;
***************
*** 39,43 ****
public class SoapSender extends Sender {
! public void send(String endpoint, NamedObject obj) throws NeudistException {
SOAPTools.soapRequest(endpoint, obj.getElement(), "/receive");
}
--- 48,52 ----
public class SoapSender extends Sender {
! public void send(String endpoint, SignedNamedObject obj) throws NeudistException {
SOAPTools.soapRequest(endpoint, obj.getElement(), "/receive");
}
|
|
From: <pe...@us...> - 2003-09-24 23:56:57
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/source
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/source
Modified Files:
CachedSource.java HttpSource.java Source.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: CachedSource.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/source/CachedSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CachedSource.java 22 Sep 2003 19:24:02 -0000 1.2
--- CachedSource.java 24 Sep 2003 23:56:49 -0000 1.3
***************
*** 3,6 ****
--- 3,15 ----
* $Id$
* $Log$
+ * Revision 1.3 2003/09/24 23:56:49 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.2 2003/09/22 19:24:02 pelle
* More fixes throughout to problems caused by renaming.
***************
*** 31,35 ****
import org.apache.commons.collections.LRUMap;
import org.neuclear.id.NSTools;
! import org.neuclear.id.NamedObject;
import org.neudist.utils.NeudistException;
--- 40,44 ----
import org.apache.commons.collections.LRUMap;
import org.neuclear.id.NSTools;
! import org.neuclear.id.SignedNamedObject;
import org.neudist.utils.NeudistException;
***************
*** 47,53 ****
! public NamedObject fetch(String endpoint, String name) throws NeudistException {
name = NSTools.normalizeNameURI(name);
! NamedObject candidate = (NamedObject) cache.get(name);
if (candidate != null)
return candidate;
--- 56,62 ----
! public SignedNamedObject fetch(String endpoint, String name) throws NeudistException {
name = NSTools.normalizeNameURI(name);
! SignedNamedObject candidate = (SignedNamedObject) cache.get(name);
if (candidate != null)
return candidate;
***************
*** 60,64 ****
}
! private void storeInCache(NamedObject obj) throws NeudistException {
cache.put(obj.getName(), obj);
}
--- 69,73 ----
}
! private void storeInCache(SignedNamedObject obj) throws NeudistException {
cache.put(obj.getName(), obj);
}
Index: HttpSource.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/source/HttpSource.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HttpSource.java 22 Sep 2003 19:24:02 -0000 1.2
--- HttpSource.java 24 Sep 2003 23:56:49 -0000 1.3
***************
*** 5,10 ****
import org.dom4j.io.SAXReader;
import org.neuclear.id.NSTools;
! import org.neuclear.id.NamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neudist.utils.NeudistException;
--- 5,11 ----
import org.dom4j.io.SAXReader;
import org.neuclear.id.NSTools;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.NamedObjectFactory;
+ import org.neuclear.id.verifier.VerifyingReader;
import org.neudist.utils.NeudistException;
***************
*** 19,22 ****
--- 20,32 ----
* $Id$
* $Log$
+ * Revision 1.3 2003/09/24 23:56:49 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.2 2003/09/22 19:24:02 pelle
* More fixes throughout to problems caused by renaming.
***************
*** 48,60 ****
}
! public NamedObject fetch(String endpoint, String name) throws NeudistException {
try {
String urlstring = endpoint + NSTools.url2path(name);
URL url = new URL(urlstring);
! Document doc = reader.read(url);
! return NamedObjectFactory.createNamedObject(doc);
! } catch (DocumentException e) {
! throw new NeudistException(name + " not found");
! } catch (MalformedURLException e) {
throw new NeudistException(e);
}
--- 58,68 ----
}
! public SignedNamedObject fetch(String endpoint, String name) throws NeudistException {
try {
String urlstring = endpoint + NSTools.url2path(name);
URL url = new URL(urlstring);
!
! return VerifyingReader.getInstance().read(url.openStream());
! } catch (java.io.IOException e) {
throw new NeudistException(e);
}
***************
*** 64,70 ****
Source source = new HttpSource();
try {
! NamedObject obj = source.fetch("http://repository.neuclear.org", "/pelle");
System.out.println("Got: " + obj.getName());
! System.out.println(obj.getElement().asXML());
} catch (NeudistException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
--- 72,78 ----
Source source = new HttpSource();
try {
! SignedNamedObject obj = source.fetch("http://repository.neuclear.org", "/pelle");
System.out.println("Got: " + obj.getName());
!
} catch (NeudistException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
Index: Source.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/source/Source.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Source.java 22 Sep 2003 19:24:02 -0000 1.2
--- Source.java 24 Sep 2003 23:56:49 -0000 1.3
***************
*** 1,5 ****
package org.neuclear.source;
! import org.neuclear.id.NamedObject;
import org.neudist.utils.NeudistException;
import org.neudist.utils.Utility;
--- 1,5 ----
package org.neuclear.source;
! import org.neuclear.id.SignedNamedObject;
import org.neudist.utils.NeudistException;
import org.neudist.utils.Utility;
***************
*** 12,15 ****
--- 12,24 ----
* $Id$
* $Log$
+ * Revision 1.3 2003/09/24 23:56:49 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.2 2003/09/22 19:24:02 pelle
* More fixes throughout to problems caused by renaming.
***************
*** 42,46 ****
*/
public abstract class Source {
! abstract public NamedObject fetch(String endpoint, String name) throws NeudistException;
public static synchronized Source getInstance() {
--- 51,55 ----
*/
public abstract class Source {
! abstract public SignedNamedObject fetch(String endpoint, String name) throws NeudistException;
public static synchronized Source getInstance() {
|
|
From: <pe...@us...> - 2003-09-24 23:56:56
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/id
Modified Files:
Identity.java InvalidIdentityException.java NSTools.java
Added Files:
Named.java NamedObjectReader.java SignedNamedObject.java
SignedObject.java
Removed Files:
GenericNamedObject.java NamedObject.java
NamedObjectFactory.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
--- NEW FILE: Named.java ---
package org.neuclear.id;
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
$Id: Named.java,v 1.1 2003/09/24 23:56:48 pelle Exp $
$Log: Named.java,v $
Revision 1.1 2003/09/24 23:56:48 pelle
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
*/
/**
*
* User: pelleb
* Date: Sep 23, 2003
* Time: 4:06:57 PM
*/
public interface Named {
String getName() throws NeudistException;
String getLocalName() throws NeudistException;
}
--- NEW FILE: NamedObjectReader.java ---
package org.neuclear.id;
import org.dom4j.Element;
import org.neudist.utils.NeudistException;
import java.sql.Timestamp;
/*
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: NamedObjectReader.java,v 1.1 2003/09/24 23:56:48 pelle Exp $
$Log: NamedObjectReader.java,v $
Revision 1.1 2003/09/24 23:56:48 pelle
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
*/
/**
*
* User: pelleb
* Date: Sep 23, 2003
* Time: 5:09:57 PM
*/
public interface NamedObjectReader {
/**
* Read object from Element and fill in its details
* @param elem
* @return
*/
public SignedNamedObject read(Element elem,String name,Identity signatory,String digest,Timestamp timestamp) throws NeudistException;
}
--- NEW FILE: SignedNamedObject.java ---
/*
* $Id: SignedNamedObject.java,v 1.1 2003/09/24 23:56:48 pelle Exp $
* $Log: SignedNamedObject.java,v $
* Revision 1.1 2003/09/24 23:56:48 pelle
* Refactoring nearly done. New model for creating signed objects.
* With view for supporting the xmlpull api shortly for performance reasons.
* Currently still uses dom4j but that has been refactored out that it
* should now be very quick to implement a xmlpull implementation.
*
* A side benefit of this is that the API has been further simplified. I still have some work
* todo with regards to cleaning up some of the outlying parts of the code.
*
* Revision 1.3 2003/09/23 19:16:27 pelle
* Changed NameSpace to Identity.
* To cause less confusion in the future.
*
* Revision 1.2 2003/09/22 19:24:01 pelle
* More fixes throughout to problems caused by renaming.
*
* Revision 1.1.1.1 2003/09/19 14:41:03 pelle
* First import into the neuclear project. This was originally under the SF neudist
* project. This marks a general major refactoring and renaming ahead.
*
* The new name for this code is NeuClear Identity and has the general package header of
* org.neuclear.id
* There are other areas within the current code which will be split out into other subprojects later on.
* In particularly the signers will be completely seperated out as well as the contract types.
*
*
* Revision 1.13 2003/02/18 14:57: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 SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
*
* Revision 1.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 SignedNamedObject.
* Then there is the veriifer, which verifies a given SignedNamedObject using the NSResolver.
* This has simplified the SignedNamedObject classes drastically, leaving them as mainly data objects, which is what they
* should be.
* I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate.
* NSCache now operates using http://www.waterken.com's fantastic ADT collections library.
* Something important has been added, which is a SignRequest named object. This signed object, embeds an unsigned
* named object for signing by an end users' signing service.
* Now were almost ready to start seriously implementing AssetIssuers and Transfers, which will be the most important
* part of the framework.
*
* Revision 1.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
* SignedNamedObject 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.
* - Identity 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;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.Namespace;
import org.neudist.utils.NeudistException;
import java.sql.Timestamp;
/**
* Major changes made. SignedNamedObject is now always a verified object.
*/
public class SignedNamedObject implements SignedObject, Named {
protected SignedNamedObject(String name, Identity signer,Timestamp timestamp,String digest) throws NeudistException {
this.name=NSTools.normalizeNameURI(name);
this.signer=signer;
this.timestamp=timestamp;
this.digest=digest;
}
/**
* The full name (URI) of an object
* @return String containing the fully qualified URI of an object
*/
public String getName() throws NeudistException {
return name;
}
/**
* The Name of an object within it's parent Identity
* @return Parent Name
*/
public String getLocalName() throws NeudistException {
String fullName = getName();
int i = fullName.lastIndexOf('/');
return fullName.substring(i + 1);
}
public Timestamp getTimeStamp() throws NeudistException {
return timestamp;
}
public final void log() throws NeudistException {
Identity ns = getSignatory();
ns.log(this);
}
public Identity getSignatory() {
return signer;
}
public String getDigest() {
return digest;
}
private String name;
private Identity signer;
private Timestamp timestamp;
private String digest;
final public static class Reader implements NamedObjectReader {
/**
* Read object from Element and fill in its details
* @param elem
* @return
*/
public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws NeudistException {
return new SignedNamedObject(name,signatory,timestamp,digest);
}
}
public static final String NSDL_NAMESPACE="http://neudist.org/neu/nsdl";
public static final Namespace NS_NSDL=DocumentHelper.createNamespace("nsdl",NSDL_NAMESPACE);
public static final String NSDL_PREFIX="nsdl:";
}
--- NEW FILE: SignedObject.java ---
/* $Id: SignedObject.java,v 1.1 2003/09/24 23:56:48 pelle Exp $
* $Log: SignedObject.java,v $
* Revision 1.1 2003/09/24 23:56:48 pelle
* Refactoring nearly done. New model for creating signed objects.
* With view for supporting the xmlpull api shortly for performance reasons.
* Currently still uses dom4j but that has been refactored out that it
* should now be very quick to implement a xmlpull implementation.
*
* A side benefit of this is that the API has been further simplified. I still have some work
* todo with regards to cleaning up some of the outlying parts of the code.
*
* Revision 1.3 2003/02/14 21:14:08 pelle
* The AbstractElementProxy has a new final method .asXML()
* which is similar to DOM4J's but it outputs the xml in the compact format and not the pretty format, thus not causing problems with Canonicalization.
* You can now also easily get the digest of a SignedElement with the new .getDigest() value.
*
* Revision 1.2 2003/02/08 18:48:37 pelle
* The Signature phase has been rewritten.
* There now is a new Class called QuickEmbeddedSignature which is more in line with my original idea for this library.
* It simply has a template of the xml and signs it in a standard way.
* The original XMLSignature class is still used for verification and will in the future handle more thoroughly
* all the various flavours of XMLSig.
* XMLSecTools has got different flavours of canonicalize now. Including one where you can pass it a Canonicaliser to use.
* Of the new Canonicalizer's are CanonicalizerWithComments, which I accidently left out of the last commit.
* And CanonicalizerWithoutSignature which leaves out the Signature in the Canonicalization phase and is thus
* a lot more efficient than the previous approach.
*
* Revision 1.1 2003/01/21 03:14:11 pelle
* Mainly clean ups through out and further documentation.
*
* Revision 1.1 2003/01/18 18:12:32 pelle
* First Independent commit of the Independent XML-Signature API for NeuDist.
*
* Revision 1.2 2003/01/16 19:16:09 pelle
* Major Structural Changes.
* We've split the test classes out of the normal source tree, to enable Maven's test support to work.
* WARNING
* for Development purposes the code does not as of this commit until otherwise notified actually verifysigs.
* We are reworking the XMLSig library and need to continue work elsewhere for the time being.
* DO NOT USE THIS FOR REAL APPS
*
* Revision 1.1 2002/12/17 21:53:29 pelle
* Final changes for refactoring.
*
* Revision 1.4 2002/12/17 21:41:04 pelle
* First part of refactoring of SignedNamedObject and SignedObject Interface/Class parings.
*
* Revision 1.3 2002/12/17 20:34:44 pelle
* Lots of changes to core functionality.
* First of all I've refactored most of the Resolving and verification code. I have a few more things to do
* on it before I'm happy.
* There is now a NSResolver class, which handles all the namespace resolution. I took most of the functionality
* for this out of SignedNamedObject.
* Then there is the veriifer, which verifies a given SignedNamedObject using the NSResolver.
* This has simplified the SignedNamedObject classes drastically, leaving them as mainly data objects, which is what they
* should be.
* I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate.
* NSCache now operates using http://www.waterken.com's fantastic ADT collections library.
* Something important has been added, which is a SignRequest named object. This signed object, embeds an unsigned
* named object for signing by an end users' signing service.
* Now were almost ready to start seriously implementing AssetIssuers and Transfers, which will be the most important
* part of the framework.
*
* Revision 1.2 2002/09/21 23:11:16 pelle
* A bunch of clean ups. Got rid of as many hard coded URL's as I could.
*
*/
package org.neuclear.id;
/**
* SignedObject provides an interface to the data of an object that was signed
* AND verified.
* @author pelleb
* @version $Revision: 1.1 $
*/
import org.neudist.utils.NeudistException;
public interface SignedObject {
Identity getSignatory();
String getDigest();
}
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Identity.java 23 Sep 2003 19:16:26 -0000 1.1
--- Identity.java 24 Sep 2003 23:56:48 -0000 1.2
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.1 2003/09/23 19:16:26 pelle
* Changed NameSpace to Identity.
***************
*** 33,37 ****
* 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 Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 42,46 ----
* 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 SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 49,53 ****
*
* 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
--- 58,62 ----
*
* Revision 1.4 2002/12/17 21:40:54 pelle
! * First part of refactoring of SignedNamedObject and SignedObject Interface/Class parings.
*
* Revision 1.3 2002/12/17 20:34:39 pelle
***************
*** 56,62 ****
* 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.
--- 65,71 ----
* on it before I'm happy.
* There is now a NSResolver class, which handles all the namespace resolution. I took most of the functionality
! * for this out of SignedNamedObject.
! * Then there is the veriifer, which verifies a given SignedNamedObject using the NSResolver.
! * This has simplified the SignedNamedObject classes drastically, leaving them as mainly data objects, which is what they
* should be.
* I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate.
***************
*** 145,169 ****
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
- import org.dom4j.QName;
- import org.neuclear.id.resolver.NSResolver;
- import org.neuclear.senders.LogSender;
- import org.neuclear.senders.Sender;
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 Identity extends NamedObject {
/**
- * This constructor should be used by subclasses of Identity. It creates a Standard Identity 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 Identity
! * @param allow PublicKey allowed to sign in here
* @param repository URL of Default Store for Identity. (Note. A Identity object is stored in the default repository of it's parent namespace)
* @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing
--- 154,182 ----
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.neudist.utils.NeudistException;
import org.neudist.utils.Utility;
import org.neudist.xml.xmlsec.KeyInfo;
import org.neudist.xml.xmlsec.XMLSecTools;
+ import org.neudist.xml.xmlsec.XMLSecurityException;
+ import org.neudist.crypto.CryptoTools;
+ import org.neudist.crypto.CryptoException;
+ import org.neuclear.senders.Sender;
+ import org.neuclear.id.resolver.NSResolver;
import java.security.PublicKey;
import java.util.Iterator;
import java.util.List;
+ import java.sql.Timestamp;
! public final class Identity extends SignedNamedObject {
! private static final String NSROOTPKMOD = "AKbv1DrfQCj7fbcc/9U8mLHi9LzFGVw8ac9z26BN1+yeq9VG3wvW+OXjvUpQ9cD+dpwpFXeai9Hz DkFeJcT9Coi9A8Aj4nffWAlxJ/AVOIRCi1d4A/d9InhQ7UYYA5O7XBcwKneopYVa9zRDUoy0ZpVy t9Kj5i0Zw6oZsflAu4S4pIU+niYwwWrYmCuBEq9kecf7nSGiU0rHp1QNs7NYdhXCl2BMcSaz0AZt AF8YLlZYasviJkoxUFBB/Vjqa98xi7V7XIGsMbXWqUvJ8MW2N/CUdBz5aDlpBUwul8rqyq+03A0q 84AFJiUcudqVL7KhURXB8ZYy/hZb+YkEvE3IigU=";
! private static final String NSROOTPKEXP = "AQAB";
! private static PublicKey nsrootpk;
/**
* @param name The Name of Identity
! * @param signatory The Signatory that signed this object
! * @param timestamp The TimeStamp of the SignedNamedObject
* @param repository URL of Default Store for Identity. (Note. A Identity object is stored in the default repository of it's parent namespace)
* @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing
***************
*** 171,266 ****
* @throws NeudistException
*/
- public Identity(String name, PublicKey allow, String repository, String signer, String logger, String receiver) throws NeudistException {
- super(name, "Identity");
-
- Element root = getElement();
- // We have meaningful defaults for the following two
- this.repository = Utility.denullString(repository, NSResolver.NSROOTSTORE);
- this.logger = Utility.denullString(repository, LogSender.LOGGER);
this.signer = signer;
this.receiver = receiver;
! root.addAttribute(DocumentHelper.createQName("repository", NamedObject.NS_NSDL), this.repository);
! root.addAttribute(DocumentHelper.createQName("logger", NamedObject.NS_NSDL), receiver);
! if (!Utility.isEmpty(signer))
! root.addAttribute(DocumentHelper.createQName("signer", NamedObject.NS_NSDL), signer);
!
! if (!Utility.isEmpty(receiver))
! root.addAttribute(DocumentHelper.createQName("receiver", NamedObject.NS_NSDL), receiver);
!
! if (allow != null) {
! QName allowName = DocumentHelper.createQName("allow", NamedObject.NS_NSDL);
! Element pub = root.addElement(allowName);
! pubs = new PublicKey[1];
! pubs[0] = allow;
! pub.add(XMLSecTools.createKeyInfo(allow));
! }
}
- public Identity(String name, PublicKey allow, String repository) throws NeudistException {
- this(name, allow, repository, null, null, null);
- }
- public Identity(String name, PublicKey allow) throws NeudistException {
- this(name, allow, null);
- }
- /**
- * This constructor should be used by subclasses of Identity. It creates a Standard Identity document, but doesn't sign it.
- * The signing should be done as the last step of the constructor of the subclass.
- */
- /*
- protected Identity(String name) throws NeudistException {
- super(name,"Identity");
- }
- */
- /**
- * Builds a Identity from an XML Document.
- */
- public Identity(Element nsElem) throws NeudistException/*,KeyResolverException*/ {
- super(nsElem);
- try {
- Element ns = getElement();
- repository = ns.attributeValue(DocumentHelper.createQName("store", NamedObject.NS_NSDL));
- signer = ns.attributeValue(DocumentHelper.createQName("signer", NamedObject.NS_NSDL));
- logger = ns.attributeValue(DocumentHelper.createQName("logger", NamedObject.NS_NSDL));
- receiver = ns.attributeValue(DocumentHelper.createQName("receiver", NamedObject.NS_NSDL));
-
- Element allowElement = ns.element(DocumentHelper.createQName("allow", NamedObject.NS_NSDL));
- List keys = allowElement.elements(XMLSecTools.createQName("KeyInfo"));
- 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();
- }
- } catch (Exception e) {
- Utility.rethrowException(e);
- }
- }
-
- /**
- * Returns the first allowed public key
- * @return the first allowed public key
- */
- public PublicKey getAllowed() {
- if (pubs != null && pubs.length > 0)
- return pubs[0];
- else
- return null;
- }
-
- public boolean postAllowed(NamedObject obj) throws NeudistException {
- try {
- for (int i = 0; i < pubs.length; i++) {
- if (obj.verifySignature(pubs[i]))
- return true;
- }
- } catch (Exception e) {
- Utility.rethrowException(e);
- }
- return false;
- };
public String getRepository() {
--- 184,200 ----
* @throws NeudistException
*/
+ 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;
+ this.logger = logger;
this.signer = signer;
this.receiver = receiver;
! this.pubs = pubs;
}
public String getRepository() {
***************
*** 276,280 ****
}
! public final void send(NamedObject obj) throws NeudistException {
if (!Utility.isEmpty(receiver))
Sender.quickSend(receiver, obj);
--- 210,214 ----
}
! public final void send(SignedNamedObject obj) throws NeudistException {
if (!Utility.isEmpty(receiver))
Sender.quickSend(receiver, obj);
***************
*** 283,287 ****
}
! void log(NamedObject obj) throws NeudistException {
if (!Utility.isEmpty(logger))
Sender.quickSend(logger, obj);
--- 217,221 ----
}
! void log(SignedNamedObject obj) throws NeudistException {
if (!Utility.isEmpty(logger))
Sender.quickSend(logger, obj);
***************
*** 291,295 ****
return "Identity";
}
!
private String repository;
private String signer;
--- 225,231 ----
return "Identity";
}
! public PublicKey[] getPublicKeys(){
! return pubs;
! }
private String repository;
private String signer;
***************
*** 298,300 ****
--- 234,283 ----
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;
+
+ /**
+ * Returns the fixed Root PublicKey
+ */
+ private final static PublicKey getRootPK() throws XMLSecurityException {
+ if (nsrootpk == null)
+ nsrootpk = CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP);
+ return nsrootpk;
+ }
+
+ //TODO I dont like this being public
+ final static class Reader implements NamedObjectReader {
+ /**
+ * Read object from Element and fill in its details
+ * @param elem
+ * @return
+ */
+ public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws NeudistException {
+ String repository=elem.attributeValue(DocumentHelper.createQName("store",SignedNamedObject.NS_NSDL));
+ String signer=elem.attributeValue(DocumentHelper.createQName("signer",SignedNamedObject.NS_NSDL));
+ String logger=elem.attributeValue(DocumentHelper.createQName("logger",SignedNamedObject.NS_NSDL));
+ String receiver=elem.attributeValue(DocumentHelper.createQName("receiver",SignedNamedObject.NS_NSDL));
+
+ 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);
+ }
+
+ }
+
}
Index: InvalidIdentityException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/InvalidIdentityException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** InvalidIdentityException.java 23 Sep 2003 19:16:27 -0000 1.1
--- InvalidIdentityException.java 24 Sep 2003 23:56:48 -0000 1.2
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.1 2003/09/23 19:16:27 pelle
* Changed NameSpace to Identity.
***************
*** 21,25 ****
* Revision 1.3 2003/02/14 21:10:26 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 Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 30,34 ----
* Revision 1.3 2003/02/14 21:10:26 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
Index: NSTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NSTools.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NSTools.java 23 Sep 2003 19:16:27 -0000 1.3
--- NSTools.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:27 pelle
* Changed NameSpace to Identity.
***************
*** 21,25 ****
* Revision 1.11 2003/02/14 21:10:28 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 Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 30,34 ----
* Revision 1.11 2003/02/14 21:10:28 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 42,46 ****
*
* Revision 1.6 2002/12/17 21:40:53 pelle
! * First part of refactoring of NamedObject and SignedObject Interface/Class parings.
*
* Revision 1.5 2002/12/17 20:34:39 pelle
--- 51,55 ----
*
* Revision 1.6 2002/12/17 21:40:53 pelle
! * First part of refactoring of SignedNamedObject and SignedObject Interface/Class parings.
*
* Revision 1.5 2002/12/17 20:34:39 pelle
***************
*** 49,55 ****
* 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.
--- 58,64 ----
* on it before I'm happy.
* There is now a NSResolver class, which handles all the namespace resolution. I took most of the functionality
! * for this out of SignedNamedObject.
! * Then there is the veriifer, which verifies a given SignedNamedObject using the NSResolver.
! * This has simplified the SignedNamedObject classes drastically, leaving them as mainly data objects, which is what they
* should be.
* I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate.
***************
*** 195,199 ****
public static void main(String args[]) {
try {
! NamedObject obj = NamedObjectFactory.fetchNamedObject("neu://free/pelle");
System.out.println("Got: " + obj.getName());
obj = NamedObjectFactory.fetchNamedObject("neu://pelle");
--- 204,208 ----
public static void main(String args[]) {
try {
! SignedNamedObject obj = NamedObjectFactory.fetchNamedObject("neu://free/pelle");
System.out.println("Got: " + obj.getName());
obj = NamedObjectFactory.fetchNamedObject("neu://pelle");
--- GenericNamedObject.java DELETED ---
--- NamedObject.java DELETED ---
--- NamedObjectFactory.java DELETED ---
|
|
From: <pe...@us...> - 2003-09-24 23:56:56
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/signers/commandline
Modified Files:
CommandLineSigner.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: CommandLineSigner.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline/CommandLineSigner.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CommandLineSigner.java 23 Sep 2003 19:16:28 -0000 1.3
--- CommandLineSigner.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 1,4 ****
--- 1,13 ----
/* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:28 pelle
* Changed NameSpace to Identity.
***************
*** 31,35 ****
* Revision 1.10 2003/02/14 21:10:35 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The NamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 40,44 ----
* Revision 1.10 2003/02/14 21:10:35 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 47,51 ****
*
* Revision 1.6 2002/12/17 21:40:58 pelle
! * First part of refactoring of NamedObject and SignedObject Interface/Class parings.
*
* Revision 1.5 2002/12/17 20:34:41 pelle
--- 56,60 ----
*
* Revision 1.6 2002/12/17 21:40:58 pelle
! * First part of refactoring of SignedNamedObject and SignedObject Interface/Class parings.
*
* Revision 1.5 2002/12/17 20:34:41 pelle
***************
*** 54,60 ****
* 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.
--- 63,69 ----
* on it before I'm happy.
* There is now a NSResolver class, which handles all the namespace resolution. I took most of the functionality
! * for this out of SignedNamedObject.
! * Then there is the veriifer, which verifies a given SignedNamedObject using the NSResolver.
! * This has simplified the SignedNamedObject classes drastically, leaving them as mainly data objects, which is what they
* should be.
* I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate.
***************
*** 110,114 ****
import org.neuclear.id.NSTools;
import org.neuclear.id.Identity;
! import org.neuclear.id.NamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neuclear.id.resolver.NSResolver;
--- 119,123 ----
import org.neuclear.id.NSTools;
import org.neuclear.id.Identity;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neuclear.id.resolver.NSResolver;
***************
*** 182,186 ****
}
}
! NamedObject subject;
if (!doCreate) {
subject = loadNamedObject(sf);
--- 191,195 ----
}
}
! SignedNamedObject subject;
if (!doCreate) {
subject = loadNamedObject(sf);
***************
*** 229,234 ****
}
! private static NamedObject loadNamedObject(String sf) throws FileNotFoundException, NeudistException {
! NamedObject subject;
InputStream source = System.in;
if (!Utility.isEmpty(sf)) {
--- 238,243 ----
}
! private static SignedNamedObject loadNamedObject(String sf) throws FileNotFoundException, NeudistException {
! SignedNamedObject subject;
InputStream source = System.in;
if (!Utility.isEmpty(sf)) {
|
|
From: <pe...@us...> - 2003-09-24 23:56:56
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/id/verifier
Added Files:
VerifyingReader.java
Removed Files:
NSVerifier.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
--- NEW FILE: VerifyingReader.java ---
package org.neuclear.id.verifier;
import org.neudist.xml.xmlsec.SignedElement;
import org.neudist.xml.xmlsec.XMLSecurityException;
import org.neudist.xml.xmlsec.XMLSecTools;
import org.neudist.xml.XMLTools;
import org.neudist.xml.XMLException;
import org.neudist.utils.NeudistException;
import org.neudist.crypto.CryptoTools;
import org.dom4j.Namespace;
import org.dom4j.Element;
import org.dom4j.QName;
import org.dom4j.DocumentHelper;
import org.neuclear.id.*;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.id.cache.NSCache;
import org.neuclear.time.TimeTools;
import java.security.PublicKey;
import java.io.InputStream;
import java.util.Map;
import java.util.HashMap;
import java.sql.Timestamp;
/*
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: VerifyingReader.java,v 1.1 2003/09/24 23:56:48 pelle Exp $
$Log: VerifyingReader.java,v $
Revision 1.1 2003/09/24 23:56:48 pelle
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
*/
/**
*
* User: pelleb
* Date: Sep 23, 2003
* Time: 4:47:15 PM
*/
public class VerifyingReader {
private VerifyingReader(){
readers=new HashMap();
readers.put("Identity",new Identity.Reader());
defaultReader=new SignedNamedObject.Reader();
}
public static VerifyingReader getInstance() {
return new VerifyingReader();
}
/**
* Read Object from input stream.
* Verify signature with parent Identity
* @param is
* @return
* @throws NeudistException
*/
public SignedNamedObject read(InputStream is) throws NeudistException {
Element elem=XMLTools.loadDocument(is).getRootElement();
String name=NSTools.normalizeNameURI(elem.attributeValue(getNameAttrQName()));
String signatoryName=NSTools.getParentNSURI(name);
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)));
Timestamp timestamp=TimeTools.parseTimeStamp(elem.attributeValue("timestamp"));
return resolveReader(elem).read(elem,name,signatory, digest,timestamp);
} else
throw new InvalidIdentityException(name+" isnt valid");
}
private NamedObjectReader resolveReader(Element elem){
NamedObjectReader reader=(NamedObjectReader) readers.get(elem.getName());
if (reader==null)
reader=defaultReader;
return reader;
}
private static QName getNameAttrQName() {
return DocumentHelper.createQName("name",SignedNamedObject.NS_NSDL);
}
private Map readers;
private NamedObjectReader defaultReader;
}
--- NSVerifier.java DELETED ---
|
|
From: <pe...@us...> - 2003-09-24 23:56:56
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/test/org/neuclear/store
Modified Files:
AbstractStoreTest.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: AbstractStoreTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store/AbstractStoreTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AbstractStoreTest.java 23 Sep 2003 19:16:29 -0000 1.3
--- AbstractStoreTest.java 24 Sep 2003 23:56:49 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
$Id$
$Log$
+ Revision 1.4 2003/09/24 23:56:49 pelle
+ Refactoring nearly done. New model for creating signed objects.
+ With view for supporting the xmlpull api shortly for performance reasons.
+ Currently still uses dom4j but that has been refactored out that it
+ should now be very quick to implement a xmlpull implementation.
+
+ A side benefit of this is that the API has been further simplified. I still have some work
+ todo with regards to cleaning up some of the outlying parts of the code.
+
Revision 1.3 2003/09/23 19:16:29 pelle
Changed NameSpace to Identity.
***************
*** 147,162 ****
// store.receive(new Identity(eveName,root,eve.getPublic()));
// System.out.println("Fetching "+rootName);
! // NamedObject nobj1=store.fetch(rootName);
// assertEquals(NSTools.normalizeNameURI(rootName),nobj1.getName());
// System.out.println("Fetching "+bobName);
! // NamedObject nobj2=store.fetch(bobName);
// assertEquals(NSTools.normalizeNameURI(bobName),nobj2.getName());
//
// System.out.println("Fetching "+bobAliceName);
! // NamedObject nobj3=store.fetch(bobAliceName);
// assertEquals(NSTools.normalizeNameURI(bobAliceName),nobj3.getName());
//
// System.out.println("Fetching "+eveName);
! // NamedObject nobj4=store.fetch(eveName);
// assertEquals(NSTools.normalizeNameURI(eveName),nobj4.getName());
}
--- 156,171 ----
// store.receive(new Identity(eveName,root,eve.getPublic()));
// System.out.println("Fetching "+rootName);
! // SignedNamedObject nobj1=store.fetch(rootName);
// assertEquals(NSTools.normalizeNameURI(rootName),nobj1.getName());
// System.out.println("Fetching "+bobName);
! // SignedNamedObject nobj2=store.fetch(bobName);
// assertEquals(NSTools.normalizeNameURI(bobName),nobj2.getName());
//
// System.out.println("Fetching "+bobAliceName);
! // SignedNamedObject nobj3=store.fetch(bobAliceName);
// assertEquals(NSTools.normalizeNameURI(bobAliceName),nobj3.getName());
//
// System.out.println("Fetching "+eveName);
! // SignedNamedObject nobj4=store.fetch(eveName);
// assertEquals(NSTools.normalizeNameURI(eveName),nobj4.getName());
}
|
|
From: <pe...@us...> - 2003-09-24 23:56:55
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/id/resolver
Modified Files:
NSResolver.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: NSResolver.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver/NSResolver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NSResolver.java 23 Sep 2003 19:16:27 -0000 1.3
--- NSResolver.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 27,31 ****
* @return
*/
! public final static Identity resolveNameSpace(String name) throws NeudistException, InvalidIdentityException {
Identity ns = NSCACHE.fetchCached(name);
if (ns != null)
--- 27,31 ----
* @return
*/
! public final static Identity resolveIdentity(String name) throws NeudistException, InvalidIdentityException {
Identity ns = NSCACHE.fetchCached(name);
if (ns != null)
***************
*** 34,50 ****
String parentname = NSTools.getParentNSURI(name);
String store = NSROOTSTORE;
! boolean isRootlevel = parentname == null || parentname.equals("neu://");
! Identity parent = null;
! if (!isRootlevel) {
! parent = resolveNameSpace(parentname);
! store = parent.getRepository();
! }
// fetches Identity from parent Identity's Default Store
ns = (Identity) Source.getInstance().fetch(store, name);
if (ns == null)
throw new NeudistException("Identity: " + name + " was not resolved");
- PublicKey parentkey = (isRootlevel) ? NSVerifier.getRootPK() : parent.getAllowed();
- if (!ns.verifySignature(parentkey))
- throw new InvalidIdentityException("Identity: " + name + " not allowed in " + parentname);
NSCACHE.cache(ns);
return ns; //This may not be null
--- 34,45 ----
String parentname = NSTools.getParentNSURI(name);
String store = NSROOTSTORE;
! if ( parentname == null || parentname.equals("neu://"))
! return Identity.getRootIdentity();
! Identity parent = resolveIdentity(parentname);
! store = parent.getRepository();
// fetches Identity from parent Identity's Default Store
ns = (Identity) Source.getInstance().fetch(store, name);
if (ns == null)
throw new NeudistException("Identity: " + name + " was not resolved");
NSCACHE.cache(ns);
return ns; //This may not be null
|
|
From: <pe...@us...> - 2003-09-24 23:56:55
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/targets
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/id/targets
Modified Files:
TargetReference.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: TargetReference.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/targets/TargetReference.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TargetReference.java 23 Sep 2003 19:16:27 -0000 1.3
--- TargetReference.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:48 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:27 pelle
* Changed NameSpace to Identity.
***************
*** 26,30 ****
* 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 Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 35,39 ----
* 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 SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 55,59 ****
import org.dom4j.Element;
import org.dom4j.Namespace;
! import org.neuclear.id.NamedObject;
import org.neuclear.senders.Sender;
import org.neudist.utils.NeudistException;
--- 64,68 ----
import org.dom4j.Element;
import org.dom4j.Namespace;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.senders.Sender;
import org.neudist.utils.NeudistException;
***************
*** 62,66 ****
public class TargetReference extends AbstractElementProxy {
! public TargetReference(NamedObject obj, Element elem) throws NeudistException {
super(elem);
if (!elem.getName().equals(TAG_NAME))
--- 71,75 ----
public class TargetReference extends AbstractElementProxy {
! public TargetReference(SignedNamedObject obj, Element elem) throws NeudistException {
super(elem);
if (!elem.getName().equals(TAG_NAME))
***************
*** 69,87 ****
}
! public TargetReference(NamedObject obj, String href, String type) {
! super(DocumentHelper.createQName(TAG_NAME, NamedObject.NS_NSDL));
if (!Utility.isEmpty(href))
! getElement().addAttribute(DocumentHelper.createQName("href", NamedObject.NS_NSDL), href);
if (!Utility.isEmpty(type))
! getElement().addAttribute(DocumentHelper.createQName("type", NamedObject.NS_NSDL), type);
owner = obj;
}
public String getHref() {
! return getElement().attributeValue(DocumentHelper.createQName("href", NamedObject.NS_NSDL));
}
public String getType() {
! return getElement().attributeValue(DocumentHelper.createQName("type", NamedObject.NS_NSDL));
}
--- 78,96 ----
}
! public TargetReference(SignedNamedObject obj, String href, String type) {
! super(DocumentHelper.createQName(TAG_NAME, SignedNamedObject.NS_NSDL));
if (!Utility.isEmpty(href))
! getElement().addAttribute(DocumentHelper.createQName("href", SignedNamedObject.NS_NSDL), href);
if (!Utility.isEmpty(type))
! getElement().addAttribute(DocumentHelper.createQName("type", SignedNamedObject.NS_NSDL), type);
owner = obj;
}
public String getHref() {
! return getElement().attributeValue(DocumentHelper.createQName("href", SignedNamedObject.NS_NSDL));
}
public String getType() {
! return getElement().attributeValue(DocumentHelper.createQName("type", SignedNamedObject.NS_NSDL));
}
***************
*** 93,97 ****
public Namespace getNS() {
! return NamedObject.NS_NSDL;
}
--- 102,106 ----
public Namespace getNS() {
! return SignedNamedObject.NS_NSDL;
}
***************
*** 100,103 ****
}
! private NamedObject owner;
}
--- 109,112 ----
}
! private SignedNamedObject owner;
}
|
|
From: <pe...@us...> - 2003-09-24 23:56:54
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signrequest
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/id/signrequest
Modified Files:
SignatureRequest.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: SignatureRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signrequest/SignatureRequest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SignatureRequest.java 23 Sep 2003 19:16:27 -0000 1.3
--- SignatureRequest.java 24 Sep 2003 23:56:48 -0000 1.4
***************
*** 12,16 ****
import org.dom4j.Element;
import org.dom4j.Namespace;
! import org.neuclear.id.NamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neudist.crypto.CryptoTools;
--- 12,16 ----
import org.dom4j.Element;
import org.dom4j.Namespace;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neudist.crypto.CryptoTools;
***************
*** 25,33 ****
* Named Object.
*/
! public class SignatureRequest extends NamedObject {
/**
* <p>Used by a website to create an authentication ticket for validation.</p>
* <p>Eg.:<br>
! * <tt>NamedObject ticket=new AuthenticationTicket("neu://test/bob","neu://site/neubay",36000,"http://neubay.com");</tt><br>
* Would give you a namedobject containing the following xml:<br>
* <pre><nsauth:AuthenticationTicket xmlns:nsauth="http://neuclear.org/neu/nsauth" xmlns:nsdl="http://neuclear.org/neu/nsdl" nsdl:name="/test/two/neu.testapp.-2o1qkqrvxyesyt7dae22ulvp56eju30zyys5t6nxjjie2gw3qq" nsauth:validto="20021002T084919848GMT+00:00" nsauth:href="http://localhost:8080/neudistframework/">
--- 25,33 ----
* Named Object.
*/
! public class SignatureRequest extends SignedNamedObject {
/**
* <p>Used by a website to create an authentication ticket for validation.</p>
* <p>Eg.:<br>
! * <tt>SignedNamedObject ticket=new AuthenticationTicket("neu://test/bob","neu://site/neubay",36000,"http://neubay.com");</tt><br>
* Would give you a namedobject containing the following xml:<br>
* <pre><nsauth:AuthenticationTicket xmlns:nsauth="http://neuclear.org/neu/nsauth" xmlns:nsdl="http://neuclear.org/neu/nsdl" nsdl:name="/test/two/neu.testapp.-2o1qkqrvxyesyt7dae22ulvp56eju30zyys5t6nxjjie2gw3qq" nsauth:validto="20021002T084919848GMT+00:00" nsauth:href="http://localhost:8080/neudistframework/">
***************
*** 37,43 ****
* @param reqNameSpace The requesters Identity eg. neu://site/neubay
* @param target URL for interactive signing service to send user to after signing.
! * @param payload the NamedObject to request signing
*/
! private SignatureRequest(String reqNameSpace, String target, NamedObject payload) throws NeudistException {
super(createUniqueTicketName(reqNameSpace, payload.getName()), SignatureRequest.TAG_NAME, SignatureRequest.NS_NSSIGREQ);
addElement(payload);
--- 37,43 ----
* @param reqNameSpace The requesters Identity eg. neu://site/neubay
* @param target URL for interactive signing service to send user to after signing.
! * @param payload the SignedNamedObject to request signing
*/
! private SignatureRequest(String reqNameSpace, String target, SignedNamedObject payload) throws NeudistException {
super(createUniqueTicketName(reqNameSpace, payload.getName()), SignatureRequest.TAG_NAME, SignatureRequest.NS_NSSIGREQ);
addElement(payload);
***************
*** 60,64 ****
}
! public static SignatureRequest createRequest(String requester, String targeturl, NamedObject payload, PrivateKey signer) throws NeudistException {
SignatureRequest req = new SignatureRequest(requester, targeturl, payload);
req.sign(signer);
--- 60,64 ----
}
! public static SignatureRequest createRequest(String requester, String targeturl, SignedNamedObject payload, PrivateKey signer) throws NeudistException {
SignatureRequest req = new SignatureRequest(requester, targeturl, payload);
req.sign(signer);
***************
*** 117,125 ****
}
! public NamedObject getPayload() {
return payload;
}
! private NamedObject payload;
private static final String TAG_NAME = "SignatureRequest";
--- 117,125 ----
}
! public SignedNamedObject getPayload() {
return payload;
}
! private SignedNamedObject payload;
private static final String TAG_NAME = "SignatureRequest";
|
|
From: <pe...@us...> - 2003-09-24 23:56:53
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/contracts/nsauth
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/contracts/nsauth
Modified Files:
AuthenticationTicket.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: AuthenticationTicket.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/contracts/nsauth/AuthenticationTicket.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AuthenticationTicket.java 23 Sep 2003 19:16:26 -0000 1.3
--- AuthenticationTicket.java 24 Sep 2003 23:56:47 -0000 1.4
***************
*** 13,18 ****
import org.dom4j.Namespace;
import org.neuclear.id.Identity;
! import org.neuclear.id.NamedObject;
! import org.neuclear.id.NamedObjectFactory;
import org.neuclear.id.signrequest.SignatureRequest;
import org.neuclear.time.TimeTools;
--- 13,17 ----
import org.dom4j.Namespace;
import org.neuclear.id.Identity;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.signrequest.SignatureRequest;
import org.neuclear.time.TimeTools;
***************
*** 29,70 ****
* It generates a unique Name in the users Identity, which the user then signs.
*/
! public class AuthenticationTicket extends NamedObject {
/**
* <p>Used by a website to create an authentication ticket for validation.</p>
* <p>Eg.:<br>
! * <tt>NamedObject ticket=new AuthenticationTicket("neu://test/bob","neu://site/neubay",36000,"http://neubay.com");</tt><br>
* Would give you a namedobject containing the following xml:<br>
* <pre><nsauth:AuthenticationTicket xmlns:nsauth="http://neuclear.org/neu/nsauth" xmlns:nsdl="http://neuclear.org/neu/nsdl" nsdl:name="/test/two/neu.testapp.-2o1qkqrvxyesyt7dae22ulvp56eju30zyys5t6nxjjie2gw3qq" nsauth:validto="20021002T084919848GMT+00:00" nsauth:href="http://localhost:8080/neudistframework/">
* </nsauth:AuthenticationTicket>
*</pre>
! *
! * @param user The Users namespace eg: neu://test/bob
! * @param requester The requesters Identity eg. neu://site/neubay
! * @param validity The validity of the ticket in Milliseconds
! * @param siteurl URL for interactive signing service to send user to after signing.
! */
! private AuthenticationTicket(String user, String requester, long validity, String siteurl) throws NeudistException {
! super(createUniqueTicketName(user, requester), AuthenticationTicket.TAG_NAME, AuthenticationTicket.NS_NSAUTH);
!
! NamedObject userns = NamedObjectFactory.fetchNamedObject(user);
!
! if (userns == null || (!(userns instanceof Identity)) || (Utility.isEmpty(((Identity) userns).getSigner())))
! throw new NeudistException("The provided namespace: " + user + " doesnt exist or doesnt allow interactive signing");
! Element root = getElement();
! if (validity >= 0)
! root.addAttribute(DocumentHelper.createQName("validto", NS_NSAUTH), TimeTools.formatTimeStamp(new Timestamp(new Date().getTime() + validity)));
! if (!Utility.isEmpty(siteurl))
! root.addAttribute(DocumentHelper.createQName("href", NS_NSAUTH), siteurl);
! }
- /**
- * This constructor is used to create a UserAuthenticationTicket from an XML Element
- * @param elem AuthenticationTicket element
- * @throws NeudistException
- */
- public AuthenticationTicket(Element elem) throws NeudistException {
- super(elem);
}
public static SignatureRequest createAuthenticationRequest(String user, String requester, long validity, String siteurl, String targeturl, PrivateKey signer) throws NeudistException {
AuthenticationTicket ticket = new AuthenticationTicket(user, requester, validity, siteurl);
--- 28,59 ----
* It generates a unique Name in the users Identity, which the user then signs.
*/
! public class AuthenticationTicket extends SignedNamedObject {
/**
* <p>Used by a website to create an authentication ticket for validation.</p>
* <p>Eg.:<br>
! * <tt>SignedNamedObject ticket=new AuthenticationTicket("neu://test/bob","neu://site/neubay",36000,"http://neubay.com");</tt><br>
* Would give you a namedobject containing the following xml:<br>
* <pre><nsauth:AuthenticationTicket xmlns:nsauth="http://neuclear.org/neu/nsauth" xmlns:nsdl="http://neuclear.org/neu/nsdl" nsdl:name="/test/two/neu.testapp.-2o1qkqrvxyesyt7dae22ulvp56eju30zyys5t6nxjjie2gw3qq" nsauth:validto="20021002T084919848GMT+00:00" nsauth:href="http://localhost:8080/neudistframework/">
* </nsauth:AuthenticationTicket>
*</pre>
! *
! * @param name
! * @param signatory
! * @param timestamp
! * @param digest
! * @param requester
! * @param validto
! * @param siteurl
! * @throws NeudistException
! */
! private AuthenticationTicket(String name, Identity signatory,Timestamp timestamp,String digest, String requester, Timestamp validto, String siteurl) throws NeudistException {
! super(name, signatory, timestamp, digest);
! this.validTo=validto;
! this.siteurl=siteurl;
! this.requester=requester;
}
+ /*
public static SignatureRequest createAuthenticationRequest(String user, String requester, long validity, String siteurl, String targeturl, PrivateKey signer) throws NeudistException {
AuthenticationTicket ticket = new AuthenticationTicket(user, requester, validity, siteurl);
***************
*** 72,75 ****
--- 61,65 ----
}
+ */
/**
***************
*** 111,116 ****
*/
public Timestamp getValidTo() throws NeudistException {
! String ts = getElement().attributeValue(DocumentHelper.createQName("validto", NS_NSAUTH));
! return TimeTools.parseTimeStamp(ts);
}
--- 101,105 ----
*/
public Timestamp getValidTo() throws NeudistException {
! return validTo;
}
***************
*** 120,124 ****
*/
public String getSiteHref() {
! return getElement().attributeValue(DocumentHelper.createQName("href", NS_NSAUTH));
}
--- 109,113 ----
*/
public String getSiteHref() {
! return siteurl;
}
***************
*** 127,136 ****
}
- /**
- * @return the XML Identity object
- */
- public Namespace getNS() {
- return NS_NSAUTH;
- }
/*
--- 116,119 ----
***************
*** 149,152 ****
--- 132,138 ----
*/
+ private String requester;
+ private String siteurl;
+ private Timestamp validTo;
private static final String TAG_NAME = "AuthenticationTicket";
public static final String URI_NSAUTH = "http://neuclear.org/neu/nsauth";
|
|
From: <pe...@us...> - 2003-09-24 23:56:53
|
Update of /cvsroot/neuclear/neuclear-id
In directory sc8-pr-cvs1:/tmp/cvs-serv524
Modified Files:
project.xml
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: project.xml
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/project.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** project.xml 23 Sep 2003 19:16:26 -0000 1.5
--- project.xml 24 Sep 2003 23:56:47 -0000 1.6
***************
*** 87,92 ****
<dependency>
<id>dom4j</id>
! <version>1.3</version>
! <jar>dom4j-1.3.jar</jar>
<properties>
<war.bundle.jar>true</war.bundle.jar>
--- 87,92 ----
<dependency>
<id>dom4j</id>
! <version>1.4</version>
! <jar>dom4j-1.4.jar</jar>
<properties>
<war.bundle.jar>true</war.bundle.jar>
|
|
From: <pe...@us...> - 2003-09-24 23:56:53
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/contracts/transfer
In directory sc8-pr-cvs1:/tmp/cvs-serv524/src/java/org/neuclear/contracts/transfer
Modified Files:
Asset.java Transfer.java
Log Message:
Refactoring nearly done. New model for creating signed objects.
With view for supporting the xmlpull api shortly for performance reasons.
Currently still uses dom4j but that has been refactored out that it
should now be very quick to implement a xmlpull implementation.
A side benefit of this is that the API has been further simplified. I still have some work
todo with regards to cleaning up some of the outlying parts of the code.
Index: Asset.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/contracts/transfer/Asset.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Asset.java 23 Sep 2003 19:16:26 -0000 1.3
--- Asset.java 24 Sep 2003 23:56:47 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:47 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:26 pelle
* Changed NameSpace to Identity.
***************
*** 21,25 ****
* Revision 1.6 2003/02/14 21:10:32 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 Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 30,34 ----
* Revision 1.6 2003/02/14 21:10:32 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 32,36 ****
*
* Revision 1.3 2002/12/17 21:40:56 pelle
! * First part of refactoring of NamedObject and SignedObject Interface/Class parings.
*
* Revision 1.2 2002/12/17 20:34:40 pelle
--- 41,45 ----
*
* Revision 1.3 2002/12/17 21:40:56 pelle
! * First part of refactoring of SignedNamedObject and SignedObject Interface/Class parings.
*
* Revision 1.2 2002/12/17 20:34:40 pelle
***************
*** 39,45 ****
* 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.
--- 48,54 ----
* on it before I'm happy.
* There is now a NSResolver class, which handles all the namespace resolution. I took most of the functionality
! * for this out of SignedNamedObject.
! * Then there is the veriifer, which verifies a given SignedNamedObject using the NSResolver.
! * This has simplified the SignedNamedObject classes drastically, leaving them as mainly data objects, which is what they
* should be.
* I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate.
***************
*** 60,68 ****
import org.dom4j.Element;
import org.dom4j.Namespace;
! import org.neuclear.id.NamedObject;
import org.neuclear.receiver.Receiver;
import org.neudist.utils.NeudistException;
! public class Asset extends NamedObject implements Receiver {
public Asset(String name, String service, String interactive, String description) {//TODO Add validity fields
--- 69,77 ----
import org.dom4j.Element;
import org.dom4j.Namespace;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.receiver.Receiver;
import org.neudist.utils.NeudistException;
! public class Asset extends SignedNamedObject implements Receiver {
public Asset(String name, String service, String interactive, String description) {//TODO Add validity fields
***************
*** 99,103 ****
}
! public void receive(NamedObject obj) throws NeudistException {
// SOAPStore.storeDirect(getServiceURL(),obj);
}
--- 108,112 ----
}
! public void receive(SignedNamedObject obj) throws NeudistException {
// SOAPStore.storeDirect(getServiceURL(),obj);
}
Index: Transfer.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/contracts/transfer/Transfer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Transfer.java 23 Sep 2003 19:16:26 -0000 1.3
--- Transfer.java 24 Sep 2003 23:56:47 -0000 1.4
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/24 23:56:47 pelle
+ * Refactoring nearly done. New model for creating signed objects.
+ * With view for supporting the xmlpull api shortly for performance reasons.
+ * Currently still uses dom4j but that has been refactored out that it
+ * should now be very quick to implement a xmlpull implementation.
+ *
+ * A side benefit of this is that the API has been further simplified. I still have some work
+ * todo with regards to cleaning up some of the outlying parts of the code.
+ *
* Revision 1.3 2003/09/23 19:16:26 pelle
* Changed NameSpace to Identity.
***************
*** 21,25 ****
* Revision 1.7 2003/02/14 21:10:32 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 Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
--- 30,34 ----
* Revision 1.7 2003/02/14 21:10:32 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
! * The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
***************
*** 32,36 ****
*
* Revision 1.4 2002/12/17 21:40:56 pelle
! * First part of refactoring of NamedObject and SignedObject Interface/Class parings.
*
* Revision 1.3 2002/12/04 13:52:47 pelle
--- 41,45 ----
*
* Revision 1.4 2002/12/17 21:40:56 pelle
! * First part of refactoring of SignedNamedObject and SignedObject Interface/Class parings.
*
* Revision 1.3 2002/12/04 13:52:47 pelle
***************
*** 44,48 ****
import org.dom4j.Element;
import org.dom4j.Namespace;
! import org.neuclear.id.NamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neudist.crypto.CryptoTools;
--- 53,57 ----
import org.dom4j.Element;
import org.dom4j.Namespace;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.NamedObjectFactory;
import org.neudist.crypto.CryptoTools;
***************
*** 51,55 ****
import java.util.Date;
! public class Transfer extends NamedObject {
public Transfer(String userNameSpace, String recipient, String assetType, double amount) {//TODO Add validity fields
--- 60,64 ----
import java.util.Date;
! public class Transfer extends SignedNamedObject {
public Transfer(String userNameSpace, String recipient, String assetType, double amount) {//TODO Add validity fields
|
|
From: <bug...@ve...> - 2003-09-23 20:20:42
|
The following comment has been added to this issue:
Author: Pelle Braendgaard
Created: Tue, 23 Sep 2003 3:18 PM
Body:
This turned out to more important than I first thought. So I am now working on it.
---------------------------------------------------------------------
View the issue:
http://devone.veraxpay.com:9090/secure/ViewIssue.jspa?key=NEU-2
Here is an overview of the issue:
---------------------------------------------------------------------
Key: NEU-2
Summary: Refactor out the dom4j dependency
Type: New Feature
Status: In Progress
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: Mon, 22 Sep 2003 11:59 AM
Updated: Tue, 23 Sep 2003 3:18 PM
Description:
The ID library at the moment is way to reliant on dom4j.
We should really be able to use some other kind of method for actually verifying the items.
---------------------------------------------------------------------
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: <bug...@ve...> - 2003-09-23 20:19:59
|
Message: Work on this issue has been started by Pelle Braendgaard (mailto:pe...@ve...) --------------------------------------------------------------------- View the issue: http://devone.veraxpay.com:9090/secure/ViewIssue.jspa?key=NEU-2 Here is an overview of the issue: --------------------------------------------------------------------- Key: NEU-2 Summary: Refactor out the dom4j dependency Type: New Feature Status: In Progress 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: Mon, 22 Sep 2003 11:59 AM Updated: Tue, 23 Sep 2003 3:18 PM Description: The ID library at the moment is way to reliant on dom4j. We should really be able to use some other kind of method for actually verifying the items. --------------------------------------------------------------------- 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: <bug...@ve...> - 2003-09-23 20:06:42
|
The following comment has been added to this issue:
Author: Pelle Braendgaard
Created: Tue, 23 Sep 2003 3:05 PM
Body:
This is not really that important at the moment. So I have downgraded the importance of it.
---------------------------------------------------------------------
View the issue:
http://devone.veraxpay.com:9090/secure/ViewIssue.jspa?key=GL-15
Here is an overview of the issue:
---------------------------------------------------------------------
Key: GL-15
Summary: Create Hibernate implementation
Type: New Feature
Status: Assigned
Priority: Minor
Original Estimate: 3 days
Time Spent: Unknown
Remaining: 3 days
Project: NeuClear Ledger
Components:
SQL Ledger
Versions:
r_0_3
Assignee: Pelle Braendgaard
Reporter: Pelle Braendgaard
Created: Sat, 23 Aug 2003 4:38 PM
Updated: Tue, 23 Sep 2003 3:05 PM
Description:
This is a possibility
---------------------------------------------------------------------
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: <bug...@ve...> - 2003-09-23 20:06:09
|
The following issue has been updated:
Updater: Pelle Braendgaard (mailto:pe...@ve...)
Date: Tue, 23 Sep 2003 3:04 PM
Changes:
priority changed from Major
---------------------------------------------------------------------
For a full history of the issue, see:
http://devone.veraxpay.com:9090/secure/ViewIssue.jspa?key=GL-15&page=history
---------------------------------------------------------------------
View the issue:
http://devone.veraxpay.com:9090/secure/ViewIssue.jspa?key=GL-15
Here is an overview of the issue:
---------------------------------------------------------------------
Key: GL-15
Summary: Create Hibernate implementation
Type: New Feature
Status: Assigned
Priority: Minor
Original Estimate: 3 days
Time Spent: Unknown
Remaining: 3 days
Project: NeuClear Ledger
Components:
SQL Ledger
Versions:
r_0_3
Assignee: Pelle Braendgaard
Reporter: Pelle Braendgaard
Created: Sat, 23 Aug 2003 4:38 PM
Updated: Tue, 23 Sep 2003 3:04 PM
Description:
This is a possibility
---------------------------------------------------------------------
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: <bug...@ve...> - 2003-09-23 20:05:34
|
Message: Work on this issue has been started by Pelle Braendgaard (mailto:pe...@ve...) --------------------------------------------------------------------- View the issue: http://devone.veraxpay.com:9090/secure/ViewIssue.jspa?key=PAY-5 Here is an overview of the issue: --------------------------------------------------------------------- Key: PAY-5 Summary: Create NeuClear Payment Transaction Receiver Type: New Feature Status: In Progress Priority: Major Original Estimate: Unknown Time Spent: Unknown Remaining: Unknown Project: NeuClear Payments Fix Fors: 0.3 Versions: 0.3 Assignee: Pelle Braendgaard Reporter: Pelle Braendgaard Created: Sat, 23 Aug 2003 4:47 PM Updated: Tue, 23 Sep 2003 3:03 PM Description: Need to create an implementation of the NamedObject receiver for handling digitally signed payment transaction requests. --------------------------------------------------------------------- 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: <bug...@ve...> - 2003-09-23 20:05:01
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://devone.veraxpay.com:9090/secure/ViewIssue.jspa?key=NEU-4 Here is an overview of the issue: --------------------------------------------------------------------- Key: NEU-4 Summary: Change NameSpace to Identity Type: Improvement Status: Closed Priority: Major Resolution: FIXED 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: Mon, 22 Sep 2003 2:09 PM Updated: Tue, 23 Sep 2003 3:03 PM Description: To make it simpler to understand I suggest changing the naming convensions used here. The word NameSpace is used by too many existing concepts that it causes confusion. --------------------------------------------------------------------- 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-23 20:02:09
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/pay/contracts In directory sc8-pr-cvs1:/tmp/cvs-serv29020/src/java/org/neuclear/pay/contracts Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/pay/contracts added to the repository |
|
From: <pe...@us...> - 2003-09-23 20:01:26
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/pay/receiver In directory sc8-pr-cvs1:/tmp/cvs-serv28811/src/java/org/neuclear/pay/receiver Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/pay/receiver added to the repository |
|
From: <pe...@us...> - 2003-09-23 19:17:02
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signrequest
In directory sc8-pr-cvs1:/tmp/cvs-serv18509a/src/java/org/neuclear/id/signrequest
Modified Files:
SignatureRequest.java
Log Message:
Changed NameSpace to Identity.
To cause less confusion in the future.
Index: SignatureRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/signrequest/SignatureRequest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SignatureRequest.java 22 Sep 2003 19:24:01 -0000 1.2
--- SignatureRequest.java 23 Sep 2003 19:16:27 -0000 1.3
***************
*** 35,39 ****
*</pre>
*
! * @param reqNameSpace The requesters NameSpace eg. neu://site/neubay
* @param target URL for interactive signing service to send user to after signing.
* @param payload the NamedObject to request signing
--- 35,39 ----
*</pre>
*
! * @param reqNameSpace The requesters Identity eg. neu://site/neubay
* @param target URL for interactive signing service to send user to after signing.
* @param payload the NamedObject to request signing
***************
*** 111,115 ****
/**
! * @return the XML NameSpace object
*/
public Namespace getNS() {
--- 111,115 ----
/**
! * @return the XML Identity object
*/
public Namespace getNS() {
|
|
From: <pe...@us...> - 2003-09-23 19:17:02
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id In directory sc8-pr-cvs1:/tmp/cvs-serv18509a/src/java/org/neuclear/id Modified Files: NSCommandLine.java NSTools.java NamedObject.java NamedObjectFactory.java Added Files: Identity.java InvalidIdentityException.java Removed Files: InvalidNameSpaceException.java NameSpace.java Log Message: Changed NameSpace to Identity. To cause less confusion in the future. --- NEW FILE: Identity.java --- /* * $Id: Identity.java,v 1.1 2003/09/23 19:16:26 pelle Exp $ * $Log: Identity.java,v $ * Revision 1.1 2003/09/23 19:16:26 pelle * Changed NameSpace to Identity. * To cause less confusion in the future. * * Revision 1.2 2003/09/22 19:24:01 pelle * More fixes throughout to problems caused by renaming. * * Revision 1.1.1.1 2003/09/19 14:41:08 pelle * First import into the neuclear project. This was originally under the SF neudist * project. This marks a general major refactoring and renaming ahead. * * The new name for this code is NeuClear Identity and has the general package header of * org.neuclear.id * There are other areas within the current code which will be split out into other subprojects later on. * In particularly the signers will be completely seperated out as well as the contract types. * * * Revision 1.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://neuclear.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 Identity's logger. * The Identity object also has a new method send() which allows one to send a named object to the Identity's * default receiver. * * Revision 1.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. * - Identity 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 .id objects in the neuspace folder have been updated with the * latest version of the format. * "neuspace/root.id" should now be considered the universal parent of the * neuclear 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; import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.dom4j.QName; import org.neuclear.id.resolver.NSResolver; import org.neuclear.senders.LogSender; import org.neuclear.senders.Sender; 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 Identity extends NamedObject { /** * This constructor should be used by subclasses of Identity. It creates a Standard Identity 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 Identity * @param allow PublicKey allowed to sign in here * @param repository URL of Default Store for Identity. (Note. A Identity object is stored in the default repository of it's parent namespace) * @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing * @param receiver URL of default receiver for namespace * @throws NeudistException */ public Identity(String name, PublicKey allow, String repository, String signer, String logger, String receiver) throws NeudistException { super(name, "Identity"); Element root = getElement(); // We have meaningful defaults for the following two this.repository = Utility.denullString(repository, NSResolver.NSROOTSTORE); this.logger = Utility.denullString(repository, LogSender.LOGGER); this.signer = signer; this.receiver = receiver; root.addAttribute(DocumentHelper.createQName("repository", NamedObject.NS_NSDL), this.repository); root.addAttribute(DocumentHelper.createQName("logger", NamedObject.NS_NSDL), receiver); if (!Utility.isEmpty(signer)) root.addAttribute(DocumentHelper.createQName("signer", NamedObject.NS_NSDL), signer); if (!Utility.isEmpty(receiver)) root.addAttribute(DocumentHelper.createQName("receiver", NamedObject.NS_NSDL), receiver); if (allow != null) { QName allowName = DocumentHelper.createQName("allow", NamedObject.NS_NSDL); Element pub = root.addElement(allowName); pubs = new PublicKey[1]; pubs[0] = allow; pub.add(XMLSecTools.createKeyInfo(allow)); } } public Identity(String name, PublicKey allow, String repository) throws NeudistException { this(name, allow, repository, null, null, null); } public Identity(String name, PublicKey allow) throws NeudistException { this(name, allow, null); } /** * This constructor should be used by subclasses of Identity. It creates a Standard Identity document, but doesn't sign it. * The signing should be done as the last step of the constructor of the subclass. */ /* protected Identity(String name) throws NeudistException { super(name,"Identity"); } */ /** * Builds a Identity from an XML Document. */ public Identity(Element nsElem) throws NeudistException/*,KeyResolverException*/ { super(nsElem); try { Element ns = getElement(); repository = ns.attributeValue(DocumentHelper.createQName("store", NamedObject.NS_NSDL)); signer = ns.attributeValue(DocumentHelper.createQName("signer", NamedObject.NS_NSDL)); logger = ns.attributeValue(DocumentHelper.createQName("logger", NamedObject.NS_NSDL)); receiver = ns.attributeValue(DocumentHelper.createQName("receiver", NamedObject.NS_NSDL)); Element allowElement = ns.element(DocumentHelper.createQName("allow", NamedObject.NS_NSDL)); List keys = allowElement.elements(XMLSecTools.createQName("KeyInfo")); 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(); } } catch (Exception e) { Utility.rethrowException(e); } } /** * Returns the first allowed public key * @return the first allowed public key */ public PublicKey getAllowed() { if (pubs != null && pubs.length > 0) return pubs[0]; else return null; } public boolean postAllowed(NamedObject obj) throws NeudistException { try { for (int i = 0; i < pubs.length; i++) { if (obj.verifySignature(pubs[i])) return true; } } catch (Exception e) { Utility.rethrowException(e); } return false; }; public String getRepository() { return repository; } public String getSigner() { return signer; } public String getLogger() { return logger; } public final void send(NamedObject obj) throws NeudistException { if (!Utility.isEmpty(receiver)) Sender.quickSend(receiver, obj); else throw new NeudistException("Cant send object, " + getName() + " doesnt have a registered Receiver"); } void log(NamedObject obj) throws NeudistException { if (!Utility.isEmpty(logger)) Sender.quickSend(logger, obj); } public String getTagName() { return "Identity"; } private String repository; private String signer; private String logger; private String receiver; private PublicKey pubs[]; } --- NEW FILE: InvalidIdentityException.java --- /* * $Id: InvalidIdentityException.java,v 1.1 2003/09/23 19:16:27 pelle Exp $ * $Log: InvalidIdentityException.java,v $ * Revision 1.1 2003/09/23 19:16:27 pelle * Changed NameSpace to Identity. * To cause less confusion in the future. * * Revision 1.2 2003/09/22 19:24:01 pelle * More fixes throughout to problems caused by renaming. * * Revision 1.1.1.1 2003/09/19 14:40:55 pelle * First import into the neuclear project. This was originally under the SF neudist * project. This marks a general major refactoring and renaming ahead. * * The new name for this code is NeuClear Identity and has the general package header of * org.neuclear.id * There are other areas within the current code which will be split out into other subprojects later on. * In particularly the signers will be completely seperated out as well as the contract types. * * * Revision 1.3 2003/02/14 21:10:26 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 Identity's logger. * The Identity object also has a new method send() which allows one to send a named object to the Identity's * default receiver. * * Revision 1.2 2003/02/14 05:10:12 pelle * New Source model is implemented. * It doesnt quite verify things correctly yet. I'm not yet sure why. * CommandLineSigner is simplified to make it easier to use. * * Revision 1.1.1.1 2002/09/18 10:55:39 pelle * First release in new CVS structure. * Also first public release. * This implemnts simple named objects. * - Identity 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:20 pelle * Lets try one more time. This is the first rev of the next gen of Neudist * * */ package org.neuclear.id; import org.neudist.utils.NeudistException; public class InvalidIdentityException extends NeudistException { public InvalidIdentityException(String msg) { super(msg); } } Index: NSCommandLine.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NSCommandLine.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** NSCommandLine.java 19 Sep 2003 14:40:59 -0000 1.1.1.1 --- NSCommandLine.java 23 Sep 2003 19:16:27 -0000 1.2 *************** *** 2,5 **** --- 2,9 ---- * $Id$ * $Log$ + * Revision 1.2 2003/09/23 19:16:27 pelle + * Changed NameSpace to Identity. + * To cause less confusion in the future. + * * Revision 1.1.1.1 2003/09/19 14:40:59 pelle * First import into the neuclear project. This was originally under the SF neudist *************** *** 27,31 **** * Also first public release. * This implemnts simple named objects. ! * - NameSpace Objects * - NSAuth Objects * --- 31,35 ---- * Also first public release. * This implemnts simple named objects. ! * - Identity Objects * - NSAuth Objects * *************** *** 135,139 **** String baseURI = "neu:/"+name; ! NameSpace id=new NameSpace(baseURI,CryptoTools.getKeyPair(ks,signer,password.toCharArray()), //CryptoTools.getKeyPair(ks,"bob",password.toCharArray()), ks.getCertificate(allowed[0]).getPublicKey()); --- 139,143 ---- String baseURI = "neu:/"+name; ! Identity id=new Identity(baseURI,CryptoTools.getKeyPair(ks,signer,password.toCharArray()), //CryptoTools.getKeyPair(ks,"bob",password.toCharArray()), ks.getCertificate(allowed[0]).getPublicKey()); Index: NSTools.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NSTools.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NSTools.java 22 Sep 2003 19:24:01 -0000 1.2 --- NSTools.java 23 Sep 2003 19:16:27 -0000 1.3 *************** *** 2,5 **** --- 2,9 ---- * $Id$ * $Log$ + * Revision 1.3 2003/09/23 19:16:27 pelle + * Changed NameSpace to Identity. + * To cause less confusion in the future. + * * Revision 1.2 2003/09/22 19:24:01 pelle * More fixes throughout to problems caused by renaming. *************** *** 17,22 **** * Revision 1.11 2003/02/14 21:10:28 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. * --- 21,26 ---- * Revision 1.11 2003/02/14 21:10:28 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 Identity's logger. ! * The Identity object also has a new method send() which allows one to send a named object to the Identity's * default receiver. * *************** *** 135,139 **** /** ! * Returns the URI of the parent NameSpace for a given NEU Name * @param name a valid NEU Name * @return Parent URI or null if name is the root --- 139,143 ---- /** ! * Returns the URI of the parent Identity for a given NEU Name * @param name a valid NEU Name * @return Parent URI or null if name is the root Index: NamedObject.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NamedObject.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NamedObject.java 22 Sep 2003 19:24:01 -0000 1.2 --- NamedObject.java 23 Sep 2003 19:16:27 -0000 1.3 *************** *** 2,5 **** --- 2,9 ---- * $Id$ * $Log$ + * Revision 1.3 2003/09/23 19:16:27 pelle + * Changed NameSpace to Identity. + * To cause less confusion in the future. + * * Revision 1.2 2003/09/22 19:24:01 pelle * More fixes throughout to problems caused by renaming. *************** *** 22,27 **** * 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. * --- 26,31 ---- * 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 Identity's logger. ! * The Identity object also has a new method send() which allows one to send a named object to the Identity's * default receiver. * *************** *** 99,103 **** * Also first public release. * This implemnts simple named objects. ! * - NameSpace Objects * - NSAuth Objects * --- 103,107 ---- * Also first public release. * This implemnts simple named objects. ! * - Identity Objects * - NSAuth Objects * *************** *** 191,195 **** /** ! * The Name of an object within it's parent NameSpace * @return Parent Name */ --- 195,199 ---- /** ! * The Name of an object within it's parent Identity * @return Parent Name */ *************** *** 229,233 **** /** ! * @return the XML NameSpace object */ public Namespace getNS() { --- 233,237 ---- /** ! * @return the XML Identity object */ public Namespace getNS() { *************** *** 368,377 **** public final void log() throws NeudistException { ! NameSpace ns = getParent(); ns.log(this); } ! public NameSpace getParent() throws NeudistException { ! NameSpace ns = NSResolver.resolveNameSpace(NSTools.getParentNSURI(getName())); return ns; } --- 372,381 ---- public final void log() throws NeudistException { ! Identity ns = getParent(); ns.log(this); } ! public Identity getParent() throws NeudistException { ! Identity ns = NSResolver.resolveNameSpace(NSTools.getParentNSURI(getName())); return ns; } Index: NamedObjectFactory.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NamedObjectFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NamedObjectFactory.java 22 Sep 2003 19:24:01 -0000 1.2 --- NamedObjectFactory.java 23 Sep 2003 19:16:27 -0000 1.3 *************** *** 2,5 **** --- 2,9 ---- * $Id$ * $Log$ + * Revision 1.3 2003/09/23 19:16:27 pelle + * Changed NameSpace to Identity. + * To cause less confusion in the future. + * * Revision 1.2 2003/09/22 19:24:01 pelle * More fixes throughout to problems caused by renaming. *************** *** 17,22 **** * Revision 1.9 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. * --- 21,26 ---- * Revision 1.9 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 Identity's logger. ! * The Identity object also has a new method send() which allows one to send a named object to the Identity's * default receiver. * *************** *** 75,79 **** * Also first public release. * This implemnts simple named objects. ! * - NameSpace Objects * - NSAuth Objects * --- 79,83 ---- * Also first public release. * This implemnts simple named objects. ! * - Identity Objects * - NSAuth Objects * *************** *** 144,149 **** public static NamedObject createNamedObject(Element elem) throws NeudistException { QName rootName = elem.getQName(); ! if (rootName.getName().equals("NameSpace") && rootName.getNamespaceURI().equals(NamedObject.NSDL_NAMESPACE)) ! return new NameSpace(elem); else if (rootName.getName().equals("AuthenticationTicket") && rootName.getNamespaceURI().equals(AuthenticationTicket.URI_NSAUTH)) return new AuthenticationTicket(elem); --- 148,153 ---- public static NamedObject createNamedObject(Element elem) throws NeudistException { QName rootName = elem.getQName(); ! if (rootName.getName().equals("Identity") && rootName.getNamespaceURI().equals(NamedObject.NSDL_NAMESPACE)) ! return new Identity(elem); else if (rootName.getName().equals("AuthenticationTicket") && rootName.getNamespaceURI().equals(AuthenticationTicket.URI_NSAUTH)) return new AuthenticationTicket(elem); *************** *** 156,160 **** String parentName = NSTools.getParentNSURI(name); if (!parentName.equals("neu://")) { ! NameSpace parent = NSResolver.resolveNameSpace(parentName); if (parent == null) return null; --- 160,164 ---- String parentName = NSTools.getParentNSURI(name); if (!parentName.equals("neu://")) { ! Identity parent = NSResolver.resolveNameSpace(parentName); if (parent == null) return null; *************** *** 163,167 **** NamedObject nobj = Source.getInstance().fetch(NSResolver.NSROOTSTORE, name); if (!NSVerifier.isNameValid(nobj)) ! throw new InvalidNameSpaceException(nobj.getName() + " is not valid"); return nobj; } --- 167,171 ---- NamedObject nobj = Source.getInstance().fetch(NSResolver.NSROOTSTORE, name); if (!NSVerifier.isNameValid(nobj)) ! throw new InvalidIdentityException(nobj.getName() + " is not valid"); return nobj; } --- InvalidNameSpaceException.java DELETED --- --- NameSpace.java DELETED --- |