|
From: <pe...@us...> - 2003-12-10 23:58:56
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv1921/src/java/org/neuclear/id
Modified Files:
Identity.java InvalidNamedObject.java NSTools.java Named.java
NamedObjectReader.java SignatureRequest.java
SignedNamedCore.java SignedNamedObject.java SignedObject.java
Log Message:
Did some cleaning up in the builders
Fixed some stuff in IdentityCreator
New maven goal to create executable jarapp
We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
Will release shortly.
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Identity.java 21 Nov 2003 04:45:13 -0000 1.22
--- Identity.java 10 Dec 2003 23:58:51 -0000 1.23
***************
*** 2,5 ****
--- 2,12 ----
* $Id$
* $Log$
+ * Revision 1.23 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.22 2003/11/21 04:45:13 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 26,30 ****
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further send on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 33,37 ----
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further receive on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 155,159 ****
* 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.
*
--- 162,166 ----
* 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 receive() which allows one to receive a named object to the Identity's
* default receiver.
*
***************
*** 336,344 ****
}
! public SignedNamedObject send(final SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(receiver))
return Sender.quickSend(receiver, obj);
else
! throw new NeuClearException("Cant send object, " + getName() + " doesnt have a registered Receiver");
}
--- 343,351 ----
}
! public final SignedNamedObject receive(final SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(receiver))
return Sender.quickSend(receiver, obj);
else
! throw new NeuClearException("Cant receive object, " + getName() + " doesnt have a registered Receiver");
}
Index: InvalidNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/InvalidNamedObject.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** InvalidNamedObject.java 21 Nov 2003 04:45:13 -0000 1.2
--- InvalidNamedObject.java 10 Dec 2003 23:58:51 -0000 1.3
***************
*** 2,5 ****
--- 2,12 ----
* $Id$
* $Log$
+ * Revision 1.3 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.2 2003/11/21 04:45:13 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 51,55 ****
* 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.
*
--- 58,62 ----
* 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 receive() which allows one to receive 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.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** NSTools.java 8 Dec 2003 19:32:32 -0000 1.17
--- NSTools.java 10 Dec 2003 23:58:51 -0000 1.18
***************
*** 2,5 ****
--- 2,12 ----
* $Id$
* $Log$
+ * Revision 1.18 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.17 2003/12/08 19:32:32 pelle
* Added support for the http scheme into ID. See http://neuclear.org/archives/000195.html
***************
*** 91,95 ****
* 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.
*
--- 98,102 ----
* 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 receive() which allows one to receive a named object to the Identity's
* default receiver.
*
***************
*** 239,243 ****
* @throws NeuClearException if name is invalid
*/
! public static String getParentNSURI(final String uri) throws NeuClearException {
if (!isValidName(uri))
throw new InvalidNamedObject("Invalid Neu ID: " + uri);
--- 246,250 ----
* @throws NeuClearException if name is invalid
*/
! public static String getSignatoryURI(final String uri) throws NeuClearException {
if (!isValidName(uri))
throw new InvalidNamedObject("Invalid Neu ID: " + uri);
***************
*** 261,264 ****
--- 268,299 ----
/**
+ * Returns the last part of a NEU URI.
+ *
+ * @param uri a valid NEU Name
+ * @return Parent URI or null if name is the root
+ * @throws NeuClearException if name is invalid
+ */
+ public static String getLocalName(final String uri) throws NeuClearException {
+ if (!isValidName(uri))
+ throw new InvalidNamedObject("Invalid Neu ID: " + uri);
+ final int bang = uri.indexOf('!');
+
+ // We hava a Transaction ID. We always return its signer
+ if (bang > -1)
+ return uri.substring(bang + 1);
+
+ final int slash = uri.lastIndexOf('/');
+ final int at = uri.indexOf('@');
+ // We have a User ID
+ if (slash < at)
+ return uri.substring(slash + 1, at);
+ // We have a top level
+ if (uri.charAt(slash - 1) == '/')
+ return uri.substring(slash + 1);
+ //Regular
+ return uri.substring(slash + 1);
+ }
+
+ /**
* Creates a Globally Unique ID using the following algorithm:
* <ol><li>Take given Identity URI</li>
***************
*** 326,339 ****
throw new InvalidNamedObject("Invalid NEU ID: " + name);
}
/**
* Checks to see if the following name should be resolved using the HTTP Resolving Scheme
! * @param name
! * @return
*/
! public static String isHttpScheme(final String name){
if (!Utility.isEmpty(name)) {
final Matcher matcher = HTTP_SCHEME.matcher(name);
if (matcher.matches())
! return "http://"+matcher.group(2)+"/_NEUID"; //TODO switch to https
}
return null;
--- 361,376 ----
throw new InvalidNamedObject("Invalid NEU ID: " + name);
}
+
/**
* Checks to see if the following name should be resolved using the HTTP Resolving Scheme
! *
! * @param name
! * @return
*/
! public static String isHttpScheme(final String name) {
if (!Utility.isEmpty(name)) {
final Matcher matcher = HTTP_SCHEME.matcher(name);
if (matcher.matches())
! return "http://" + matcher.group(2) + "/_NEUID"; //TODO switch to https
}
return null;
***************
*** 341,353 ****
}
! private static final String HTTP_SCHEME_EX="^neu:(neuid:)?\\/\\/(([\\w-]+\\.)+[\\w-]+)$";
! private static final Pattern HTTP_SCHEME=Pattern.compile(HTTP_SCHEME_EX);
! public static final String NEUID_URI = "http://neuclear.org/neu/neuid";
public static final Namespace NS_NEUID = DocumentHelper.createNamespace("neuid", NEUID_URI);
public static final String NEUID_PREFIX = "neuid:";
! public static final String SCHEME_PREFIX = "([\\w]{1,6}:)?";
private static final String VALID_TOKEN = "[\\w][\\w.-]*";
private static final String VALID_USER_TOKEN = "(([\\w][\\w.-]*)@)?";
--- 378,390 ----
}
! private static final String HTTP_SCHEME_EX = "^neu:(neuid:)?\\/\\/(([\\w-]+\\.)+[\\w-]+)$";
! private static final Pattern HTTP_SCHEME = Pattern.compile(HTTP_SCHEME_EX);
! private static final String NEUID_URI = "http://neuclear.org/neu/neuid";
public static final Namespace NS_NEUID = DocumentHelper.createNamespace("neuid", NEUID_URI);
public static final String NEUID_PREFIX = "neuid:";
! private static final String SCHEME_PREFIX = "([\\w]{1,6}:)?";
private static final String VALID_TOKEN = "[\\w][\\w.-]*";
private static final String VALID_USER_TOKEN = "(([\\w][\\w.-]*)@)?";
Index: Named.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Named.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Named.java 21 Oct 2003 22:31:13 -0000 1.3
--- Named.java 10 Dec 2003 23:58:51 -0000 1.4
***************
*** 23,26 ****
--- 23,33 ----
$Id$
$Log$
+ Revision 1.4 2003/12/10 23:58:51 pelle
+ Did some cleaning up in the builders
+ Fixed some stuff in IdentityCreator
+ New maven goal to create executable jarapp
+ We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ Will release shortly.
+
Revision 1.3 2003/10/21 22:31:13 pelle
Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense.
***************
*** 43,47 ****
/**
- *
* User: pelleb
* Date: Sep 23, 2003
--- 50,53 ----
***************
*** 49,54 ****
*/
public interface Named {
! String getName() ;
! String getLocalName();
}
--- 55,60 ----
*/
public interface Named {
! String getName();
! String getLocalName() throws NeuClearException;
}
Index: NamedObjectReader.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NamedObjectReader.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** NamedObjectReader.java 20 Nov 2003 16:01:25 -0000 1.5
--- NamedObjectReader.java 10 Dec 2003 23:58:51 -0000 1.6
***************
*** 5,10 ****
import org.neuclear.xml.xmlsec.XMLSecurityException;
- import java.sql.Timestamp;
-
/*
NeuClear Distributed Transaction Clearing Platform
--- 5,8 ----
***************
*** 27,30 ****
--- 25,35 ----
$Id$
$Log$
+ Revision 1.6 2003/12/10 23:58:51 pelle
+ Did some cleaning up in the builders
+ Fixed some stuff in IdentityCreator
+ New maven goal to create executable jarapp
+ We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ Will release shortly.
+
Revision 1.5 2003/11/20 16:01:25 pelle
Did a security review of the basic Verification process and needed to make changes.
***************
*** 39,43 ****
Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
SignedNamedObject now contains the full xml which is returned with getEncoded()
! This means that it is now possible to further send on or process a SignedNamedObject, leaving
NamedObjectBuilder for its original purposes of purely generating new Contracts.
NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 44,48 ----
Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
SignedNamedObject now contains the full xml which is returned with getEncoded()
! This means that it is now possible to further receive on or process a SignedNamedObject, leaving
NamedObjectBuilder for its original purposes of purely generating new Contracts.
NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 79,82 ****
* @return
*/
! public SignedNamedObject read(SignedNamedCore core,Element elem) throws NeuClearException, XMLSecurityException;
}
--- 84,87 ----
* @return
*/
! public SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException;
}
Index: SignatureRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignatureRequest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** SignatureRequest.java 22 Nov 2003 00:23:47 -0000 1.8
--- SignatureRequest.java 10 Dec 2003 23:58:51 -0000 1.9
***************
*** 28,31 ****
--- 28,38 ----
$Id$
$Log$
+ Revision 1.9 2003/12/10 23:58:51 pelle
+ Did some cleaning up in the builders
+ Fixed some stuff in IdentityCreator
+ New maven goal to create executable jarapp
+ We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ Will release shortly.
+
Revision 1.8 2003/11/22 00:23:47 pelle
All unit tests in commons, id and xmlsec now work.
***************
*** 55,59 ****
Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
SignedNamedObject now contains the full xml which is returned with getEncoded()
! This means that it is now possible to further send on or process a SignedNamedObject, leaving
NamedObjectBuilder for its original purposes of purely generating new Contracts.
NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 62,66 ----
Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
SignedNamedObject now contains the full xml which is returned with getEncoded()
! This means that it is now possible to further receive on or process a SignedNamedObject, leaving
NamedObjectBuilder for its original purposes of purely generating new Contracts.
NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 72,76 ****
Revision 1.1 2003/11/06 20:01:54 pelle
Implemented AuthenticationTicket and friends to comply with the newer model.
! Created SignatureRequest and friends to send unsigned NamedObjectBuilders to interactive signing services.
*/
--- 79,83 ----
Revision 1.1 2003/11/06 20:01:54 pelle
Implemented AuthenticationTicket and friends to comply with the newer model.
! Created SignatureRequest and friends to receive unsigned NamedObjectBuilders to interactive signing services.
*/
Index: SignedNamedCore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedCore.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SignedNamedCore.java 8 Dec 2003 19:32:32 -0000 1.4
--- SignedNamedCore.java 10 Dec 2003 23:58:51 -0000 1.5
***************
*** 2,5 ****
--- 2,12 ----
* $Id$
* $Log$
+ * Revision 1.5 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.4 2003/12/08 19:32:32 pelle
* Added support for the http scheme into ID. See http://neuclear.org/archives/000195.html
***************
*** 26,30 ****
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further send on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 33,37 ----
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further receive on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 101,105 ****
* 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.
*
--- 108,112 ----
* 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 receive() which allows one to receive a named object to the Identity's
* default receiver.
*
***************
*** 206,225 ****
package org.neuclear.id;
import org.dom4j.Element;
import org.dom4j.QName;
- import org.dom4j.DocumentHelper;
import org.neuclear.commons.NeuClearException;
- import org.neuclear.commons.time.TimeTools;
import org.neuclear.commons.crypto.CryptoTools;
import org.neuclear.xml.XMLException;
- import org.neuclear.xml.XMLTools;
- import org.neuclear.xml.xmlsec.XMLSecTools;
import org.neuclear.xml.xmlsec.KeyInfo;
! import org.neuclear.id.resolver.NSResolver;
! import org.neuclear.id.verifier.VerifyingReader;
- import java.sql.Timestamp;
- import java.io.InputStream;
import java.security.PublicKey;
/**
--- 213,229 ----
package org.neuclear.id;
+ import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.QName;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.CryptoTools;
+ import org.neuclear.commons.time.TimeTools;
+ import org.neuclear.id.resolver.NSResolver;
import org.neuclear.xml.XMLException;
import org.neuclear.xml.xmlsec.KeyInfo;
! import org.neuclear.xml.xmlsec.XMLSecTools;
import java.security.PublicKey;
+ import java.sql.Timestamp;
/**
***************
*** 244,250 ****
* @see org.neuclear.commons.crypto.signers.Signer
*/
! public final class SignedNamedCore {
! private SignedNamedCore(final String name, final Identity signer, final Timestamp timestamp, final String encoded) {
this.name = name;
this.signer = signer;
--- 248,254 ----
* @see org.neuclear.commons.crypto.signers.Signer
*/
! public final class SignedNamedCore {
! private SignedNamedCore(final String name, final Identity signer, final Timestamp timestamp, final String encoded) {
this.name = name;
this.signer = signer;
***************
*** 255,278 ****
/**
* Used to read and authenticate a SignedNamedCore.
! * @param elem
! * @return
! * @throws XMLException
! * @throws NeuClearException
*/
public final static SignedNamedCore read(final Element elem) throws XMLException, NeuClearException {
final String name = NSTools.normalizeNameURI(elem.attributeValue(getNameAttrQName()));
! final String signatoryName = NSTools.getParentNSURI(name);
final Identity signatory = NSResolver.resolveIdentity(signatoryName);
PublicKey publicKey = signatory.getPublicKey();
! if (NSTools.isHttpScheme(name)!=null){
// We have a self signed http authenticated certificate and need to extract
// the PublicKey from the xml
final Element allowElement = elem.element(DocumentHelper.createQName("allow", NSTools.NS_NEUID));
final KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo")));
! publicKey= ki.getPublicKey();
}
if (XMLSecTools.verifySignature(elem, publicKey)) {
final Timestamp timestamp = TimeTools.parseTimeStamp(elem.attributeValue("timestamp"));
! return new SignedNamedCore( name, signatory, timestamp,new String(XMLSecTools.canonicalize(elem)));
} else
throw new InvalidNamedObject(name + " isnt valid");
--- 259,283 ----
/**
* Used to read and authenticate a SignedNamedCore.
! *
! * @param elem
! * @return
! * @throws XMLException
! * @throws NeuClearException
*/
public final static SignedNamedCore read(final Element elem) throws XMLException, NeuClearException {
final String name = NSTools.normalizeNameURI(elem.attributeValue(getNameAttrQName()));
! final String signatoryName = NSTools.getSignatoryURI(name);
final Identity signatory = NSResolver.resolveIdentity(signatoryName);
PublicKey publicKey = signatory.getPublicKey();
! if (NSTools.isHttpScheme(name) != null) {
// We have a self signed http authenticated certificate and need to extract
// the PublicKey from the xml
final Element allowElement = elem.element(DocumentHelper.createQName("allow", NSTools.NS_NEUID));
final KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo")));
! publicKey = ki.getPublicKey();
}
if (XMLSecTools.verifySignature(elem, publicKey)) {
final Timestamp timestamp = TimeTools.parseTimeStamp(elem.attributeValue("timestamp"));
! return new SignedNamedCore(name, signatory, timestamp, new String(XMLSecTools.canonicalize(elem)));
} else
throw new InvalidNamedObject(name + " isnt valid");
***************
*** 281,293 ****
/**
* Solely used by RootIdentity
! * @return
*/
! final static SignedNamedCore createRootCore() {
! return new SignedNamedCore("neu://",null,new Timestamp(0),null);
}
private static QName getNameAttrQName() {
return DocumentHelper.createQName("name", NSTools.NS_NEUID);
}
/**
* The full name (URI) of an object
--- 286,301 ----
/**
* Solely used by RootIdentity
! *
! * @return
*/
! final static SignedNamedCore createRootCore() {
! return new SignedNamedCore("neu://", null, new Timestamp(0), null);
}
+
private static QName getNameAttrQName() {
return DocumentHelper.createQName("name", NSTools.NS_NEUID);
}
+
/**
* The full name (URI) of an object
***************
*** 353,357 ****
private final long timestamp;
private final String encoded;
-
--- 361,364 ----
Index: SignedNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedObject.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** SignedNamedObject.java 21 Nov 2003 04:45:13 -0000 1.12
--- SignedNamedObject.java 10 Dec 2003 23:58:51 -0000 1.13
***************
*** 2,5 ****
--- 2,12 ----
* $Id$
* $Log$
+ * Revision 1.13 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.12 2003/11/21 04:45:13 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 20,24 ****
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further send on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 27,31 ----
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further receive on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 95,99 ****
* 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.
*
--- 102,106 ----
* 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 receive() which allows one to receive a named object to the Identity's
* default receiver.
*
***************
*** 202,206 ****
import org.dom4j.Element;
import org.neuclear.commons.NeuClearException;
- import org.neuclear.commons.crypto.CryptoTools;
import org.neuclear.xml.xmlsec.XMLSecurityException;
--- 209,212 ----
***************
*** 231,235 ****
protected SignedNamedObject(final SignedNamedCore core) throws NeuClearException {
! this.core=core;
}
--- 237,241 ----
protected SignedNamedObject(final SignedNamedCore core) throws NeuClearException {
! this.core = core;
}
***************
*** 291,294 ****
--- 297,318 ----
}
+ /**
+ * Logs this object to the signers logging service
+ *
+ * @throws NeuClearException
+ */
+ public void log() throws NeuClearException {
+ getSignatory().log(this);
+ }
+
+ /**
+ * Sends this object to its signers default receiver service
+ *
+ * @throws NeuClearException
+ */
+ public void send() throws NeuClearException {
+ getSignatory().receive(this);
+ }
+
private final SignedNamedCore core;
***************
*** 296,302 ****
/**
* Read object from Element and fill in its details
! *
! * @param elem
! * @return
*/
public SignedNamedObject read(final SignedNamedCore core, final Element elem) throws NeuClearException, XMLSecurityException {
--- 320,326 ----
/**
* Read object from Element and fill in its details
! *
! * @param elem
! * @return
*/
public SignedNamedObject read(final SignedNamedCore core, final Element elem) throws NeuClearException, XMLSecurityException {
Index: SignedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedObject.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SignedObject.java 19 Nov 2003 23:33:59 -0000 1.3
--- SignedObject.java 10 Dec 2003 23:58:51 -0000 1.4
***************
*** 1,9 ****
/* $Id$
* $Log$
* Revision 1.3 2003/11/19 23:33:59 pelle
* Signers now can generatekeys via the generateKey() method.
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further send on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 1,16 ----
/* $Id$
* $Log$
+ * Revision 1.4 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.3 2003/11/19 23:33:59 pelle
* Signers now can generatekeys via the generateKey() method.
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further receive on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 85,88 ****
--- 92,96 ----
* SignedObject provides an interface to the data of an object that was signed
* AND verified.
+ *
* @author pelleb
* @version $Revision$
|