|
From: <pe...@us...> - 2004-01-16 23:42:13
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv8224/src/java/org/neuclear/id
Modified Files:
Identity.java SignedNamedCore.java
Log Message:
Added Base32 class. The Base32 encoding used wasnt following the standards.
Added user creatable Identity for Public Keys
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** Identity.java 8 Jan 2004 23:39:06 -0000 1.28
--- Identity.java 16 Jan 2004 23:42:09 -0000 1.29
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.29 2004/01/16 23:42:09 pelle
+ * Added Base32 class. The Base32 encoding used wasnt following the standards.
+ * Added user creatable Identity for Public Keys
+ *
* Revision 1.28 2004/01/08 23:39:06 pelle
* XMLSignature can now give you the Signing key and the id of the signer.
***************
*** 308,319 ****
package org.neuclear.id;
- import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.neuclear.commons.NeuClearException;
- import org.neuclear.commons.Utility;
import org.neuclear.commons.crypto.CryptoException;
import org.neuclear.commons.crypto.CryptoTools;
- import org.neuclear.id.resolver.NSResolver;
- import org.neuclear.senders.Sender;
import org.neuclear.xml.xmlsec.KeyInfo;
import org.neuclear.xml.xmlsec.XMLSecTools;
--- 312,319 ----
***************
*** 324,329 ****
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
- import java.util.ArrayList;
- import java.util.Iterator;
/**
--- 324,327 ----
***************
*** 351,354 ****
--- 349,359 ----
+ /**
+ * Constructor for creating an Identity object for a "Nymous" Identity.
+ * @param pub
+ */
+ public Identity(final PublicKey pub){
+ this(new SignedNamedCore(pub),pub);
+ }
protected Identity(final SignedNamedCore core, final PublicKey pub) {
***************
*** 359,367 ****
public final String getRepository() {
! return null;
}
public final String getSigner() {
! return null;
}
--- 364,372 ----
public final String getRepository() {
! return "http://repository.neuclear.org";
}
public final String getSigner() {
! return "http://localhost:11870/Signer";
}
Index: SignedNamedCore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedCore.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** SignedNamedCore.java 14 Jan 2004 06:42:15 -0000 1.13
--- SignedNamedCore.java 16 Jan 2004 23:42:09 -0000 1.14
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.14 2004/01/16 23:42:09 pelle
+ * Added Base32 class. The Base32 encoding used wasnt following the standards.
+ * Added user creatable Identity for Public Keys
+ *
* Revision 1.13 2004/01/14 06:42:15 pelle
* Got rid of the verifyXXX() methods
***************
*** 259,265 ****
import org.dom4j.Element;
import org.dom4j.QName;
import org.neuclear.commons.crypto.CryptoTools;
import org.neuclear.commons.time.TimeTools;
- import org.neuclear.commons.LowLevelException;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.xml.xmlsec.*;
--- 263,269 ----
import org.dom4j.Element;
import org.dom4j.QName;
+ import org.neuclear.commons.LowLevelException;
import org.neuclear.commons.crypto.CryptoTools;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.xml.xmlsec.*;
***************
*** 287,291 ****
* @param pub
*/
! private SignedNamedCore(final PublicKey pub){
this.digest=CryptoTools.encodeBase32(CryptoTools.digest(pub.getEncoded()));
this.name="neu:sha1://"+digest;
--- 291,295 ----
* @param pub
*/
! public SignedNamedCore(final PublicKey pub){
this.digest=CryptoTools.encodeBase32(CryptoTools.digest(pub.getEncoded()));
this.name="neu:sha1://"+digest;
***************
*** 301,305 ****
*/
private SignedNamedCore(final PublicKey pub, final String encoded){
! this.signer = new Identity(new SignedNamedCore(pub),pub);
this.digest=CryptoTools.encodeBase32(CryptoTools.digest(encoded.getBytes()));
this.name=signer.getName()+"!"+digest;
--- 305,309 ----
*/
private SignedNamedCore(final PublicKey pub, final String encoded){
! this.signer = new Identity(pub);
this.digest=CryptoTools.encodeBase32(CryptoTools.digest(encoded.getBytes()));
this.name=signer.getName()+"!"+digest;
|