|
From: <pe...@us...> - 2003-09-29 23:17:37
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv8611/src/java/org/neuclear/id
Modified Files:
Identity.java SignedNamedObject.java
Log Message:
Changes to the senders. Now the senders only work with NamedObjectBuilders
which are the only NamedObject representations that contain full XML.
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Identity.java 26 Sep 2003 00:22:06 -0000 1.3
--- Identity.java 29 Sep 2003 23:17:31 -0000 1.4
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/09/29 23:17:31 pelle
+ * Changes to the senders. Now the senders only work with NamedObjectBuilders
+ * which are the only NamedObject representations that contain full XML.
+ *
* Revision 1.3 2003/09/26 00:22:06 pelle
* Cleanups and final changes to code for refactoring of the Verifier and Reader part.
***************
*** 166,169 ****
--- 170,174 ----
import org.neuclear.senders.Sender;
import org.neuclear.id.resolver.NSResolver;
+ import org.neuclear.id.builders.NamedObjectBuilder;
import java.security.PublicKey;
***************
*** 213,217 ****
}
! public final void send(SignedNamedObject obj) throws NeudistException {
if (!Utility.isEmpty(receiver))
Sender.quickSend(receiver, obj);
--- 218,222 ----
}
! public final void send(NamedObjectBuilder obj) throws NeudistException {
if (!Utility.isEmpty(receiver))
Sender.quickSend(receiver, obj);
***************
*** 220,224 ****
}
! void log(SignedNamedObject obj) throws NeudistException {
if (!Utility.isEmpty(logger))
Sender.quickSend(logger, obj);
--- 225,229 ----
}
! void log(NamedObjectBuilder obj) throws NeudistException {
if (!Utility.isEmpty(logger))
Sender.quickSend(logger, obj);
***************
*** 231,250 ****
return pubs;
}
! private String repository;
! private String signer;
! private String logger;
! private String receiver;
! private PublicKey pubs[];
! public final static Identity getRootIdentity() throws NeudistException {
- PublicKey rootpk=CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP);
- root=new Identity("neu://",null,new Timestamp(0),null,NSResolver.NSROOTSTORE,
- null,null,null,new PublicKey[]{rootpk});
- return root;
}
! private static Identity root;
/**
--- 236,261 ----
return pubs;
}
! private final String repository;
! private final String signer;
! private final String logger;
! private final String receiver;
! private final PublicKey pubs[];
!
! private final static Identity createRootIdentity() {
+ try {
+ PublicKey rootpk=CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP);
+ return new Identity("neu://",null,new Timestamp(0),null,NSResolver.NSROOTSTORE,
+ null,null,null,new PublicKey[]{rootpk});
+ } catch (NeudistException e) {
+ e.printStackTrace();
! return null;
! }
}
!
! public static final Identity NEUROOT=createRootIdentity();
/**
***************
*** 284,286 ****
--- 295,300 ----
}
+ public static void main(String args[]){
+
+ }
}
Index: SignedNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedObject.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SignedNamedObject.java 24 Sep 2003 23:56:48 -0000 1.1
--- SignedNamedObject.java 29 Sep 2003 23:17:31 -0000 1.2
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/09/29 23:17:31 pelle
+ * Changes to the senders. Now the senders only work with NamedObjectBuilders
+ * which are the only NamedObject representations that contain full XML.
+ *
* Revision 1.1 2003/09/24 23:56:48 pelle
* Refactoring nearly done. New model for creating signed objects.
***************
*** 185,193 ****
}
- public final void log() throws NeudistException {
- Identity ns = getSignatory();
- ns.log(this);
- }
-
public Identity getSignatory() {
return signer;
--- 189,192 ----
***************
*** 197,204 ****
return digest;
}
! private String name;
! private Identity signer;
! private Timestamp timestamp;
! private String digest;
final public static class Reader implements NamedObjectReader {
--- 196,203 ----
return digest;
}
! private final String name;
! private final Identity signer;
! private final Timestamp timestamp;
! private final String digest;
final public static class Reader implements NamedObjectReader {
|