|
From: <pe...@us...> - 2003-10-25 00:42:58
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv8101/src/java/org/neuclear/id
Modified Files:
Identity.java NSTools.java SignedNamedObject.java
Log Message:
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Identity.java 21 Oct 2003 22:31:12 -0000 1.8
--- Identity.java 25 Oct 2003 00:39:54 -0000 1.9
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.9 2003/10/25 00:39:54 pelle
+ * Fixed SmtpSender it now sends the messages.
+ * Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
+ * is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
+ * Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
+ *
* Revision 1.8 2003/10/21 22:31:12 pelle
* Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense.
***************
*** 181,190 ****
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.neuclear.id.builders.NamedObjectBuilder;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.senders.Sender;
- import org.neudist.crypto.CryptoTools;
import org.neudist.crypto.CryptoException;
! import org.neuclear.commons.NeuClearException;
import org.neudist.utils.Utility;
import org.neudist.xml.xmlsec.KeyInfo;
--- 187,196 ----
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
+ import org.neuclear.commons.NeuClearException;
import org.neuclear.id.builders.NamedObjectBuilder;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.senders.Sender;
import org.neudist.crypto.CryptoException;
! import org.neudist.crypto.CryptoTools;
import org.neudist.utils.Utility;
import org.neudist.xml.xmlsec.KeyInfo;
***************
*** 206,216 ****
/**
! * @param name The Name of Identity
! * @param signatory The Signatory that signed this object
! * @param timestamp The TimeStamp of the SignedNamedObject
* @param repository URL of Default Store for Identity. (Note. A Identity object is stored in the default repository of it's parent namespace)
! * @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing
! * @param receiver URL of default receiver for namespace
! * @throws NeuClearException
*/
--- 212,222 ----
/**
! * @param name The Name of Identity
! * @param signatory The Signatory that signed this object
! * @param timestamp The TimeStamp of the SignedNamedObject
* @param repository URL of Default Store for Identity. (Note. A Identity object is stored in the default repository of it's parent namespace)
! * @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing
! * @param receiver URL of default receiver for namespace
! * @throws NeuClearException
*/
***************
*** 286,290 ****
/**
! * Returns the fixed Root PublicKey
*/
private final static PublicKey getRootPK() throws XMLSecurityException {
--- 292,296 ----
/**
! * Returns the fixed Root PublicKey
*/
private final static PublicKey getRootPK() throws XMLSecurityException {
***************
*** 303,308 ****
* For efficiency purposes we do not store the source material here but instead
* return the URI of the certificate which allows us to regenerate it from source.
! * @return
! * @throws CertificateEncodingException
*/
public byte[] getEncoded() throws CertificateEncodingException {
--- 309,315 ----
* For efficiency purposes we do not store the source material here but instead
* return the URI of the certificate which allows us to regenerate it from source.
! *
! * @return
! * @throws CertificateEncodingException
*/
public byte[] getEncoded() throws CertificateEncodingException {
***************
*** 314,323 ****
* creation process. I just check if the signers key is the same as the given.
* TODO: This almost certainly has bad security implications and needs to be though through
! * @param publicKey
! * @throws CertificateException
! * @throws NoSuchAlgorithmException
! * @throws InvalidKeyException
! * @throws NoSuchProviderException
! * @throws SignatureException
*/
public void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
--- 321,331 ----
* creation process. I just check if the signers key is the same as the given.
* TODO: This almost certainly has bad security implications and needs to be though through
! *
! * @param publicKey
! * @throws CertificateException
! * @throws NoSuchAlgorithmException
! * @throws InvalidKeyException
! * @throws NoSuchProviderException
! * @throws SignatureException
*/
public void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
***************
*** 344,352 ****
/**
* Read object from Element and fill in its details
! * @param elem
! * @return
*/
public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws XMLSecurityException, NeuClearException {
! String repository = elem.attributeValue(DocumentHelper.createQName("store", NSTools.NS_NEUID));
String signer = elem.attributeValue(DocumentHelper.createQName("signer", NSTools.NS_NEUID));
String logger = elem.attributeValue(DocumentHelper.createQName("logger", NSTools.NS_NEUID));
--- 352,361 ----
/**
* Read object from Element and fill in its details
! *
! * @param elem
! * @return
*/
public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws XMLSecurityException, NeuClearException {
! String repository = elem.attributeValue(DocumentHelper.createQName("repository", NSTools.NS_NEUID));
String signer = elem.attributeValue(DocumentHelper.createQName("signer", NSTools.NS_NEUID));
String logger = elem.attributeValue(DocumentHelper.createQName("logger", NSTools.NS_NEUID));
Index: NSTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NSTools.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** NSTools.java 23 Oct 2003 22:02:36 -0000 1.11
--- NSTools.java 25 Oct 2003 00:39:54 -0000 1.12
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.12 2003/10/25 00:39:54 pelle
+ * Fixed SmtpSender it now sends the messages.
+ * Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
+ * is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
+ * Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
+ *
* Revision 1.11 2003/10/23 22:02:36 pelle
* Moved some certificates to live status at http://repository.neuclear.org
***************
*** 208,212 ****
for (int i = offset; i < ticketsrc.length; i++) {
! if (ticketsrc[i] == (byte) '/')
ticketsrc[i] = (byte) '.';
}
--- 214,218 ----
for (int i = offset; i < ticketsrc.length; i++) {
! if (ticketsrc[i] == (byte) '/' || ticketsrc[i] == (byte) '@')
ticketsrc[i] = (byte) '.';
}
***************
*** 241,245 ****
public static final String NEUID_PREFIX = "neuid:";
! private static final String VALID_TOKEN = "[\\w.]+";
private static final String VALID_ID = "^(neu:\\/)?" +
"(\\/(" + VALID_TOKEN + "@" + VALID_TOKEN + ")?" +
--- 247,251 ----
public static final String NEUID_PREFIX = "neuid:";
! private static final String VALID_TOKEN = "[\\w.-]+";
private static final String VALID_ID = "^(neu:\\/)?" +
"(\\/(" + VALID_TOKEN + "@" + VALID_TOKEN + ")?" +
***************
*** 248,252 ****
private static final Pattern VALID = Pattern.compile(VALID_ID);
private static final String STRIP_URI_ARROBA_EX = "^(neu:\\/)?" +
! "\\/(" + VALID_TOKEN + ")@(" + VALID_TOKEN + ")([\\/\\w.]*)$";
private static final Pattern STRIP_URI_ARROBA = Pattern.compile(STRIP_URI_ARROBA_EX);
--- 254,258 ----
private static final Pattern VALID = Pattern.compile(VALID_ID);
private static final String STRIP_URI_ARROBA_EX = "^(neu:\\/)?" +
! "\\/(" + VALID_TOKEN + ")@(" + VALID_TOKEN + ")([\\/\\w.-]*)$";
private static final Pattern STRIP_URI_ARROBA = Pattern.compile(STRIP_URI_ARROBA_EX);
Index: SignedNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedObject.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SignedNamedObject.java 21 Oct 2003 22:31:13 -0000 1.6
--- SignedNamedObject.java 25 Oct 2003 00:39:54 -0000 1.7
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.7 2003/10/25 00:39:54 pelle
+ * Fixed SmtpSender it now sends the messages.
+ * Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
+ * is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
+ * Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
+ *
* Revision 1.6 2003/10/21 22:31:13 pelle
* Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense.
***************
*** 181,184 ****
--- 187,191 ----
/**
* The full name (URI) of an object
+ *
* @return String containing the fully qualified URI of an object
*/
***************
*** 189,192 ****
--- 196,200 ----
/**
* The Name of an object within it's parent Identity
+ *
* @return Parent Name
*/
***************
*** 198,202 ****
! public Timestamp getTimeStamp() throws NeuClearException {
return timestamp;
--- 206,210 ----
! public Timestamp getTimeStamp() {
return timestamp;
***************
*** 205,209 ****
/**
* The Signatory of the current document
! * @return
*/
public Identity getSignatory() {
--- 213,218 ----
/**
* The Signatory of the current document
! *
! * @return
*/
public Identity getSignatory() {
***************
*** 213,217 ****
/**
* The SHA1 Digest of the full XML encoded document
! * @return
*/
public String getDigest() {
--- 222,227 ----
/**
* The SHA1 Digest of the full XML encoded document
! *
! * @return
*/
public String getDigest() {
***************
*** 227,232 ****
/**
* Read object from Element and fill in its details
! * @param elem
! * @return
*/
public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws NeuClearException {
--- 237,243 ----
/**
* Read object from Element and fill in its details
! *
! * @param elem
! * @return
*/
public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws NeuClearException {
|