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-11-21 17:55:19
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv13592/src/java/org/neuclear/id/builders
Modified Files:
NamedObjectBuilder.java
Log Message:
misc fixes
Index: NamedObjectBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/NamedObjectBuilder.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** NamedObjectBuilder.java 21 Nov 2003 13:57:27 -0000 1.12
--- NamedObjectBuilder.java 21 Nov 2003 17:55:16 -0000 1.13
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.13 2003/11/21 17:55:16 pelle
+ * misc fixes
+ *
* Revision 1.12 2003/11/21 13:57:27 pelle
* Changed some mutable fields in immutable classes, making them truely immutable. Thus safer.
***************
*** 441,445 ****
public Object clone() throws CloneNotSupportedException {
try {
! return new NamedObjectBuilder(getElement().createCopy());
} catch (XMLSecurityException e) {
throw new RuntimeException(e);
--- 444,448 ----
public Object clone() throws CloneNotSupportedException {
try {
! return new NamedObjectBuilder(getElement().c());
} catch (XMLSecurityException e) {
throw new RuntimeException(e);
|
|
From: <pe...@us...> - 2003-11-21 13:57:30
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv28663/src/java/org/neuclear/id
Modified Files:
SignatureRequest.java SignedNamedCore.java
Log Message:
Changed some mutable fields in immutable classes, making them truely immutable. Thus safer.
Index: SignatureRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignatureRequest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SignatureRequest.java 21 Nov 2003 04:45:13 -0000 1.6
--- SignatureRequest.java 21 Nov 2003 13:57:27 -0000 1.7
***************
*** 30,33 ****
--- 30,36 ----
$Id$
$Log$
+ Revision 1.7 2003/11/21 13:57:27 pelle
+ Changed some mutable fields in immutable classes, making them truely immutable. Thus safer.
+
Revision 1.6 2003/11/21 04:45:13 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 73,76 ****
--- 76,81 ----
* The SignatureRequest would typically be created using a SignatureRequestBuilder buy
* the Requesting site. The Users Signature service would present it to the user who signs it.
+ *
+ *
* User: pelleb
* Date: Nov 6, 2003
***************
*** 90,94 ****
public final NamedObjectBuilder getUnsigned() {
! return unsigned;
}
--- 95,103 ----
public final NamedObjectBuilder getUnsigned() {
! try {
! return (NamedObjectBuilder) unsigned.clone();
! } catch (CloneNotSupportedException e) {
! throw new RuntimeException(e);
! }
}
Index: SignedNamedCore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedCore.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SignedNamedCore.java 21 Nov 2003 04:45:13 -0000 1.2
--- SignedNamedCore.java 21 Nov 2003 13:57:27 -0000 1.3
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.3 2003/11/21 13:57:27 pelle
+ * Changed some mutable fields in immutable classes, making them truely immutable. Thus safer.
+ *
* Revision 1.2 2003/11/21 04:45:13 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 241,245 ****
this.name = name;
this.signer = signer;
! this.timestamp = timestamp;
this.encoded = encoded;
}
--- 244,248 ----
this.name = name;
this.signer = signer;
! this.timestamp = timestamp.getTime();
this.encoded = encoded;
}
***************
*** 307,311 ****
*/
public final Timestamp getTimeStamp() {
! return timestamp;
}
--- 310,314 ----
*/
public final Timestamp getTimeStamp() {
! return new Timestamp(timestamp);
}
***************
*** 336,340 ****
private final String name;
private final Identity signer;
! private final Timestamp timestamp;
private final String encoded;
--- 339,343 ----
private final String name;
private final Identity signer;
! private final long timestamp;
private final String encoded;
|
|
From: <pe...@us...> - 2003-11-21 13:57:30
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv28663/src/java/org/neuclear/id/builders
Modified Files:
NamedObjectBuilder.java
Log Message:
Changed some mutable fields in immutable classes, making them truely immutable. Thus safer.
Index: NamedObjectBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/NamedObjectBuilder.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** NamedObjectBuilder.java 21 Nov 2003 04:45:10 -0000 1.11
--- NamedObjectBuilder.java 21 Nov 2003 13:57:27 -0000 1.12
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.12 2003/11/21 13:57:27 pelle
+ * Changed some mutable fields in immutable classes, making them truely immutable. Thus safer.
+ *
* Revision 1.11 2003/11/21 04:45:10 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 197,201 ****
* This simple wrapper takes most of the contents of a NamedObject and puts it into a Serializable form that can be signed.
*/
! public class NamedObjectBuilder extends SignedElement implements Named {
public NamedObjectBuilder(final String name, final String tagName, final String prefix, final String nsURI) throws NeuClearException {
super(tagName, prefix, nsURI);
--- 200,204 ----
* This simple wrapper takes most of the contents of a NamedObject and puts it into a Serializable form that can be signed.
*/
! public class NamedObjectBuilder extends SignedElement implements Named,Cloneable {
public NamedObjectBuilder(final String name, final String tagName, final String prefix, final String nsURI) throws NeuClearException {
super(tagName, prefix, nsURI);
***************
*** 376,379 ****
--- 379,448 ----
public final Identity getParent() throws NeuClearException {
return NSResolver.resolveIdentity(NSTools.getParentNSURI(getName()));
+ }
+
+ /**
+ * Creates and returns a copy of this object. The precise meaning
+ * of "copy" may depend on the class of the object. The general
+ * intent is that, for any object <tt>x</tt>, the expression:
+ * <blockquote>
+ * <pre>
+ * x.clone() != x</pre></blockquote>
+ * will be true, and that the expression:
+ * <blockquote>
+ * <pre>
+ * x.clone().getClass() == x.getClass()</pre></blockquote>
+ * will be <tt>true</tt>, but these are not absolute requirements.
+ * While it is typically the case that:
+ * <blockquote>
+ * <pre>
+ * x.clone().equals(x)</pre></blockquote>
+ * will be <tt>true</tt>, this is not an absolute requirement.
+ * <p/>
+ * By convention, the returned object should be obtained by calling
+ * <tt>super.clone</tt>. If a class and all of its superclasses (except
+ * <tt>Object</tt>) obey this convention, it will be the case that
+ * <tt>x.clone().getClass() == x.getClass()</tt>.
+ * <p/>
+ * By convention, the object returned by this method should be independent
+ * of this object (which is being cloned). To achieve this independence,
+ * it may be necessary to modify one or more fields of the object returned
+ * by <tt>super.clone</tt> before returning it. Typically, this means
+ * copying any mutable objects that comprise the internal "deep structure"
+ * of the object being cloned and replacing the references to these
+ * objects with references to the copies. If a class contains only
+ * primitive fields or references to immutable objects, then it is usually
+ * the case that no fields in the object returned by <tt>super.clone</tt>
+ * need to be modified.
+ * <p/>
+ * The method <tt>clone</tt> for class <tt>Object</tt> performs a
+ * specific cloning operation. First, if the class of this object does
+ * not implement the interface <tt>Cloneable</tt>, then a
+ * <tt>CloneNotSupportedException</tt> is thrown. Note that all arrays
+ * are considered to implement the interface <tt>Cloneable</tt>.
+ * Otherwise, this method creates a new instance of the class of this
+ * object and initializes all its fields with exactly the contents of
+ * the corresponding fields of this object, as if by assignment; the
+ * contents of the fields are not themselves cloned. Thus, this method
+ * performs a "shallow copy" of this object, not a "deep copy" operation.
+ * <p/>
+ * The class <tt>Object</tt> does not itself implement the interface
+ * <tt>Cloneable</tt>, so calling the <tt>clone</tt> method on an object
+ * whose class is <tt>Object</tt> will result in throwing an
+ * exception at run time.
+ *
+ * @return a clone of this instance.
+ * @throws CloneNotSupportedException if the object's class does not
+ * support the <code>Cloneable</code> interface. Subclasses
+ * that override the <code>clone</code> method can also
+ * throw this exception to indicate that an instance cannot
+ * be cloned.
+ * @see Cloneable
+ */
+ public Object clone() throws CloneNotSupportedException {
+ try {
+ return new NamedObjectBuilder(getElement().createCopy());
+ } catch (XMLSecurityException e) {
+ throw new RuntimeException(e);
+ }
}
|
|
From: <pe...@us...> - 2003-11-21 13:57:30
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/auth
In directory sc8-pr-cvs1:/tmp/cvs-serv28663/src/java/org/neuclear/auth
Modified Files:
AuthenticationTicket.java
Log Message:
Changed some mutable fields in immutable classes, making them truely immutable. Thus safer.
Index: AuthenticationTicket.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/auth/AuthenticationTicket.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AuthenticationTicket.java 21 Nov 2003 04:45:10 -0000 1.5
--- AuthenticationTicket.java 21 Nov 2003 13:57:27 -0000 1.6
***************
*** 44,48 ****
private AuthenticationTicket(final SignedNamedCore core, final String requester, final Timestamp validto, final String siteurl) throws NeuClearException {
super(core);
! this.validTo = validto;
this.siteurl = siteurl;
this.requester = requester;
--- 44,48 ----
private AuthenticationTicket(final SignedNamedCore core, final String requester, final Timestamp validto, final String siteurl) throws NeuClearException {
super(core);
! this.validTo = validto.getTime();
this.siteurl = siteurl;
this.requester = requester;
***************
*** 58,62 ****
*/
public final Timestamp getValidTo() throws NeuClearException {
! return validTo;
}
--- 58,62 ----
*/
public final Timestamp getValidTo() throws NeuClearException {
! return new Timestamp(validTo);
}
***************
*** 89,93 ****
private final String requester;
private final String siteurl;
! private final Timestamp validTo;
public static final String TAG_NAME = "AuthenticationTicket";
public static final String URI_NSAUTH = "http://neuclear.org/neu/auth";
--- 89,93 ----
private final String requester;
private final String siteurl;
! private final long validTo;
public static final String TAG_NAME = "AuthenticationTicket";
public static final String URI_NSAUTH = "http://neuclear.org/neu/auth";
|
|
From: <pe...@us...> - 2003-11-21 13:57:22
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts
In directory sc8-pr-cvs1:/tmp/cvs-serv28649/src/java/org/neuclear/asset/contracts
Modified Files:
HeldTransferReceipt.java HeldTransferRequest.java
TransferContract.java
Log Message:
Changed some mutable fields in immutable classes, making them truely immutable. Thus safer.
Index: HeldTransferReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/HeldTransferReceipt.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** HeldTransferReceipt.java 21 Nov 2003 04:43:04 -0000 1.4
--- HeldTransferReceipt.java 21 Nov 2003 13:57:19 -0000 1.5
***************
*** 17,27 ****
HeldTransferReceipt(final SignedNamedCore core, final Asset asset, final Identity from, final Identity to, final String reqid, final double amount, final Date valuetime, final String comment, final Date helduntil) throws NeuClearException {
super(core, asset, from, to, reqid, amount, valuetime, comment);
! this.helduntil = helduntil;
}
public final Date getHeldUntil() {
! return helduntil;
}
! private final Date helduntil;
}
--- 17,27 ----
HeldTransferReceipt(final SignedNamedCore core, final Asset asset, final Identity from, final Identity to, final String reqid, final double amount, final Date valuetime, final String comment, final Date helduntil) throws NeuClearException {
super(core, asset, from, to, reqid, amount, valuetime, comment);
! this.helduntil = helduntil.getTime();
}
public final Date getHeldUntil() {
! return new Timestamp(helduntil);
}
! private final long helduntil;
}
Index: HeldTransferRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/HeldTransferRequest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** HeldTransferRequest.java 21 Nov 2003 04:43:04 -0000 1.3
--- HeldTransferRequest.java 21 Nov 2003 13:57:19 -0000 1.4
***************
*** 16,26 ****
HeldTransferRequest(final SignedNamedCore core, final Asset asset, final Identity to, final double amount, final Date valuetime, final String comment, final Date helduntil) throws NeuClearException {
super(core, asset, to, amount, valuetime, comment);
! this.helduntil = helduntil;
}
public final Date getHeldUntil() {
! return helduntil;
}
! private final Date helduntil;
}
--- 16,26 ----
HeldTransferRequest(final SignedNamedCore core, final Asset asset, final Identity to, final double amount, final Date valuetime, final String comment, final Date helduntil) throws NeuClearException {
super(core, asset, to, amount, valuetime, comment);
! this.helduntil = helduntil.getTime();
}
public final Date getHeldUntil() {
! return new Timestamp(helduntil);
}
! private final long helduntil;
}
Index: TransferContract.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferContract.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TransferContract.java 21 Nov 2003 04:43:04 -0000 1.5
--- TransferContract.java 21 Nov 2003 13:57:19 -0000 1.6
***************
*** 50,54 ****
this.comment = (comment != null) ? comment : "";
this.to = to;
! this.valuetime = valuetime;
}
--- 50,54 ----
this.comment = (comment != null) ? comment : "";
this.to = to;
! this.valuetime = valuetime.getTime();
}
***************
*** 58,62 ****
public final Date getValueTime() {
! return valuetime;
}
--- 58,62 ----
public final Date getValueTime() {
! return new Timestamp(valuetime);
}
***************
*** 74,78 ****
private final double amount;
private final Identity to;
! private final Date valuetime;
private final String comment;
--- 74,78 ----
private final double amount;
private final Identity to;
! private final long valuetime;
private final String comment;
|
|
From: <pe...@us...> - 2003-11-21 05:06:43
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/test/org/neuclear/id/verifier
Modified Files:
VerificationTest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: VerificationTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/verifier/VerificationTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** VerificationTest.java 15 Nov 2003 01:58:19 -0000 1.7
--- VerificationTest.java 21 Nov 2003 04:45:17 -0000 1.8
***************
*** 31,34 ****
--- 31,40 ----
$Id$
$Log$
+ Revision 1.8 2003/11/21 04:45:17 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.7 2003/11/15 01:58:19 pelle
More work all around on web applications.
***************
*** 68,73 ****
* Time: 11:38:01 AM
*/
! public class VerificationTest extends TestCase {
! public VerificationTest(String string) {
super(string);
--- 74,79 ----
* Time: 11:38:01 AM
*/
! public final class VerificationTest extends TestCase {
! public VerificationTest(final String string) {
super(string);
***************
*** 76,112 ****
}
! public void testSimple() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/simple", true);
}
! public void testSimpleSecond() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/simple", true);
}
! public void testFakes() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/fakes", false);
}
! public void runDirectoryTest(String path, boolean wantValid) throws DocumentException, IOException, FileNotFoundException, NeuClearException, XMLException {
! File dir = new File(path);
if (!dir.exists()) {
System.out.println("Doesnt exist");
return;
}
! FilenameFilter filter;
filter = new FilenameFilter() {
! public boolean accept(File dirf, String name) {
return name.endsWith(".id");
}
};
! File xmlfiles[] = dir.listFiles(filter);
System.out.println("There are " + xmlfiles.length + " files in the directory");
for (int i = 0; i < xmlfiles.length; i++) {
! File xmlfile = xmlfiles[i];
System.out.print("Testing file: " + xmlfile.getName() + "... ");
try {
! SignedNamedObject obj = reader.read(new FileInputStream(xmlfile));
System.out.println("Name : " + obj.getName() + " VERIFIED");
assertTrue(wantValid);
--- 82,118 ----
}
! public final void testSimple() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/simple", true);
}
! public final void testSimpleSecond() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/simple", true);
}
! public final void testFakes() throws IOException, DocumentException, NeuClearException, XMLException {
runDirectoryTest("src/testdata/fakes", false);
}
! public final void runDirectoryTest(final String path, final boolean wantValid) throws DocumentException, IOException, FileNotFoundException, NeuClearException, XMLException {
! final File dir = new File(path);
if (!dir.exists()) {
System.out.println("Doesnt exist");
return;
}
! final FilenameFilter filter;
filter = new FilenameFilter() {
! public boolean accept(final File dirf, final String name) {
return name.endsWith(".id");
}
};
! final File[] xmlfiles = dir.listFiles(filter);
System.out.println("There are " + xmlfiles.length + " files in the directory");
for (int i = 0; i < xmlfiles.length; i++) {
! final File xmlfile = xmlfiles[i];
System.out.print("Testing file: " + xmlfile.getName() + "... ");
try {
! final SignedNamedObject obj = reader.read(new FileInputStream(xmlfile));
System.out.println("Name : " + obj.getName() + " VERIFIED");
assertTrue(wantValid);
***************
*** 121,125 ****
}
! VerifyingReader reader;
}
--- 127,131 ----
}
! final VerifyingReader reader;
}
|
|
From: <pe...@us...> - 2003-11-21 04:45:47
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/servlet
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/store/servlet
Modified Files:
StorageServlet.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: StorageServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/servlet/StorageServlet.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** StorageServlet.java 19 Nov 2003 23:33:59 -0000 1.5
--- StorageServlet.java 21 Nov 2003 04:45:14 -0000 1.6
***************
*** 16,21 ****
import javax.servlet.ServletException;
! public class StorageServlet extends ReceiverServlet {
! public void init(ServletConfig config) throws ServletException {
System.out.println("NEUDIST: Initialising StorageServlet");
super.init(config);
--- 16,21 ----
import javax.servlet.ServletException;
! public final class StorageServlet extends ReceiverServlet {
! public final void init(final ServletConfig config) throws ServletException {
System.out.println("NEUDIST: Initialising StorageServlet");
super.init(config);
|
|
From: <pe...@us...> - 2003-11-21 04:45:47
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/source
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/source
Modified Files:
CachedSource.java HttpSource.java Source.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: CachedSource.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/source/CachedSource.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** CachedSource.java 11 Nov 2003 21:18:44 -0000 1.12
--- CachedSource.java 21 Nov 2003 04:45:14 -0000 1.13
***************
*** 3,6 ****
--- 3,12 ----
* $Id$
* $Log$
+ * Revision 1.13 2003/11/21 04:45:14 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.12 2003/11/11 21:18:44 pelle
* Further vital reshuffling.
***************
*** 103,110 ****
*/
public final class CachedSource extends Source {
! public CachedSource(Source src) {
this.src = src;
cachedirpath = System.getProperty("user.home") + "/.neuclear/cache";
! File cachedir = new File(cachedirpath);
if (!cachedir.exists())
cachedir.mkdirs();
--- 109,116 ----
*/
public final class CachedSource extends Source {
! public CachedSource(final Source src) {
this.src = src;
cachedirpath = System.getProperty("user.home") + "/.neuclear/cache";
! final File cachedir = new File(cachedirpath);
if (!cachedir.exists())
cachedir.mkdirs();
***************
*** 112,122 ****
! protected InputStream getStream(String endpoint, String name) throws NeuClearException {
! File object = new File(cachedirpath + NSTools.url2path(name) + "/root.id");
try {
if (!object.exists()) { //TODO check for freshness
object.getParentFile().mkdirs();
! InputStream in = src.getStream(endpoint, name);
! OutputStream out = new FileOutputStream(object);
int character;
//TODO Explore more efficient ways of copying streams
--- 118,128 ----
! protected InputStream getStream(final String endpoint, final String name) throws NeuClearException {
! final File object = new File(cachedirpath + NSTools.url2path(name) + "/root.id");
try {
if (!object.exists()) { //TODO check for freshness
object.getParentFile().mkdirs();
! final InputStream in = src.getStream(endpoint, name);
! final OutputStream out = new FileOutputStream(object);
int character;
//TODO Explore more efficient ways of copying streams
Index: HttpSource.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/source/HttpSource.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** HttpSource.java 11 Nov 2003 21:18:44 -0000 1.8
--- HttpSource.java 21 Nov 2003 04:45:14 -0000 1.9
***************
*** 15,18 ****
--- 15,24 ----
* $Id$
* $Log$
+ * Revision 1.9 2003/11/21 04:45:14 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.8 2003/11/11 21:18:44 pelle
* Further vital reshuffling.
***************
*** 69,78 ****
* CommandLineSigner is simplified to make it easier to use.
*/
! public class HttpSource extends Source {
! protected InputStream getStream(String endpoint, String name) throws NeuClearException {
try {
! String urlstring = endpoint + NSTools.url2path(name);
! URL url = new URL(urlstring);
return url.openStream();
--- 75,84 ----
* CommandLineSigner is simplified to make it easier to use.
*/
! public final class HttpSource extends Source {
! protected final InputStream getStream(final String endpoint, final String name) throws NeuClearException {
try {
! final String urlstring = endpoint + NSTools.url2path(name);
! final URL url = new URL(urlstring);
return url.openStream();
***************
*** 82,89 ****
}
! public static void main(String args[]) {
! Source source = new HttpSource();
try {
! SignedNamedObject obj = source.fetch("http://repository.neuclear.org", "/pelle");
System.out.println("Got: " + obj.getName());
--- 88,95 ----
}
! public static void main(final String[] args) {
! final Source source = new HttpSource();
try {
! final SignedNamedObject obj = source.fetch("http://repository.neuclear.org", "/pelle");
System.out.println("Got: " + obj.getName());
Index: Source.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/source/Source.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Source.java 11 Nov 2003 21:18:44 -0000 1.6
--- Source.java 21 Nov 2003 04:45:14 -0000 1.7
***************
*** 19,22 ****
--- 19,28 ----
* $Id$
* $Log$
+ * Revision 1.7 2003/11/21 04:45:14 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.6 2003/11/11 21:18:44 pelle
* Further vital reshuffling.
***************
*** 76,80 ****
}
! public final SignedNamedObject fetch(String endpoint, String name) throws NeuClearException {
try {
name = NSTools.normalizeNameURI(name);
--- 82,86 ----
}
! public final SignedNamedObject fetch(final String endpoint, String name) throws NeuClearException {
try {
name = NSTools.normalizeNameURI(name);
***************
*** 99,107 ****
* @return
*/
! protected InputStream getStream(String endpoint, String name) throws NeuClearException {
return null;
}
! private void storeInCache(SignedNamedObject obj) throws NeuClearException {
cache.put(obj.getName(), obj);
}
--- 105,113 ----
* @return
*/
! protected InputStream getStream(final String endpoint, final String name) throws NeuClearException {
return null;
}
! private void storeInCache(final SignedNamedObject obj) throws NeuClearException {
cache.put(obj.getName(), obj);
}
|
|
From: <pe...@us...> - 2003-11-21 04:45:47
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/signers/servlet
Modified Files:
DemoSigningServlet.java SigningServlet.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: DemoSigningServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet/DemoSigningServlet.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** DemoSigningServlet.java 15 Nov 2003 01:58:16 -0000 1.9
--- DemoSigningServlet.java 21 Nov 2003 04:45:14 -0000 1.10
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.10 2003/11/21 04:45:14 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.9 2003/11/15 01:58:16 pelle
* More work all around on web applications.
***************
*** 138,142 ****
import java.security.KeyPairGenerator;
! public class DemoSigningServlet extends SigningServlet {
/*
--- 144,148 ----
import java.security.KeyPairGenerator;
! public final class DemoSigningServlet extends SigningServlet {
/*
Index: SigningServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet/SigningServlet.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** SigningServlet.java 19 Nov 2003 23:33:59 -0000 1.14
--- SigningServlet.java 21 Nov 2003 04:45:14 -0000 1.15
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.15 2003/11/21 04:45:14 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.14 2003/11/19 23:33:59 pelle
* Signers now can generatekeys via the generateKey() method.
***************
*** 205,209 ****
public class SigningServlet extends ReceiverServlet implements PassPhraseAgent {
! public void init(ServletConfig config) throws ServletException {
System.out.println("NEUDIST: Initialising SigningServlet");
super.init(config);
--- 211,215 ----
public class SigningServlet extends ReceiverServlet implements PassPhraseAgent {
! public final void init(final ServletConfig config) throws ServletException {
System.out.println("NEUDIST: Initialising SigningServlet");
super.init(config);
***************
*** 232,236 ****
}
! protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("NEUDIST: doPost()");
if (request.getContentType().equals("text/xml")) {
--- 238,242 ----
}
! protected final void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
System.out.println("NEUDIST: doPost()");
if (request.getContentType().equals("text/xml")) {
***************
*** 243,251 ****
response.setDateHeader("Expires", 0);
response.setContentType("text/html");
! PrintWriter out = response.getWriter();
ServletTools.printHeader(out, request, title);
! String b64xml = request.getParameter("base64xml");
! String endpoint = request.getParameter("endpoint");
! NamedObjectBuilder named;
SignatureRequest sigreq = null;
boolean isSigned = false;
--- 249,257 ----
response.setDateHeader("Expires", 0);
response.setContentType("text/html");
! final PrintWriter out = response.getWriter();
ServletTools.printHeader(out, request, title);
! final String b64xml = request.getParameter("base64xml");
! final String endpoint = request.getParameter("endpoint");
! final NamedObjectBuilder named;
SignatureRequest sigreq = null;
boolean isSigned = false;
***************
*** 267,271 ****
try {
context.log("SIGN: Signing with " + parent);
! SignedNamedObject signed = named.sign(signer);
isSigned = true;
out.println("Signed<br>");
--- 273,277 ----
try {
context.log("SIGN: Signing with " + parent);
! final SignedNamedObject signed = named.sign(signer);
isSigned = true;
out.println("Signed<br>");
***************
*** 339,343 ****
}
! protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
--- 345,349 ----
}
! protected final void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
***************
*** 345,349 ****
response.setContentType("text/html");
System.out.println("NEUDIST: doGet()");
! PrintWriter out = response.getWriter();
ServletTools.printHeader(out, request, title);
out.println("<form method=\"POST\" action=\"Signer\"><textarea name=\"xml\" cols=\"80\"rows=\"30\"></textarea><br><input type=\"submit\" name=\"submit\" value=\"Confirm\"></form>");
--- 351,355 ----
response.setContentType("text/html");
System.out.println("NEUDIST: doGet()");
! final PrintWriter out = response.getWriter();
ServletTools.printHeader(out, request, title);
out.println("<form method=\"POST\" action=\"Signer\"><textarea name=\"xml\" cols=\"80\"rows=\"30\"></textarea><br><input type=\"submit\" name=\"submit\" value=\"Confirm\"></form>");
***************
*** 358,368 ****
* @return
*/
! public char[] getPassPhrase(String name) {
if (reqMap == null)
return null;
! HttpServletRequest request = (HttpServletRequest) reqMap.get(Thread.currentThread());
if (request == null)
return null;
! String passphrase = request.getParameter("passphrase");
if (passphrase == null)
return null;
--- 364,374 ----
* @return
*/
! public final char[] getPassPhrase(final String name) {
if (reqMap == null)
return null;
! final HttpServletRequest request = (HttpServletRequest) reqMap.get(Thread.currentThread());
if (request == null)
return null;
! final String passphrase = request.getParameter("passphrase");
if (passphrase == null)
return null;
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/id
Modified Files:
Identity.java InvalidNamedObject.java NSTools.java
SignatureRequest.java SignedNamedCore.java
SignedNamedObject.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** Identity.java 20 Nov 2003 23:42:24 -0000 1.21
--- Identity.java 21 Nov 2003 04:45:13 -0000 1.22
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.22 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.21 2003/11/20 23:42:24 pelle
* Getting all the tests to work in id
***************
*** 308,312 ****
*/
! protected Identity(SignedNamedCore core, String repository, String signer, String logger, String receiver, PublicKey pub) throws NeuClearException {
super(core);
this.repository = repository;
--- 314,318 ----
*/
! protected Identity(final SignedNamedCore core, final String repository, final String signer, final String logger, final String receiver, final PublicKey pub) throws NeuClearException {
super(core);
this.repository = repository;
***************
*** 330,334 ****
}
! public SignedNamedObject send(SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(receiver))
return Sender.quickSend(receiver, obj);
--- 336,340 ----
}
! public SignedNamedObject send(final SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(receiver))
return Sender.quickSend(receiver, obj);
***************
*** 337,341 ****
}
! final void log(SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(logger))
Sender.quickSend(logger, obj);
--- 343,347 ----
}
! final void log(final SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(logger))
Sender.quickSend(logger, obj);
***************
*** 360,364 ****
try {
! PublicKey rootpk = CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP);
return new Identity(SignedNamedCore.createRootCore(), NSResolver.NSROOTSTORE,
null, null, null, rootpk);
--- 366,370 ----
try {
! final PublicKey rootpk = CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP);
return new Identity(SignedNamedCore.createRootCore(), NSResolver.NSROOTSTORE,
null, null, null, rootpk);
***************
*** 372,376 ****
public final java.security.cert.Certificate[] getCertificateChain() {
! ArrayList certs = new ArrayList(3);
Identity id = this;
while (id != null) {
--- 378,382 ----
public final java.security.cert.Certificate[] getCertificateChain() {
! final ArrayList certs = new ArrayList(3);
Identity id = this;
while (id != null) {
***************
*** 380,388 ****
certs.add(NEUROOT.getCertificate());
certs.trimToSize();
! Certificate cert[] = new Certificate[certs.size()];
! Iterator iter = certs.iterator();
int i = 0;
while (iter.hasNext()) {
! Certificate certificate = (java.security.cert.Certificate) iter.next();
cert[i++] = certificate;
}
--- 386,394 ----
certs.add(NEUROOT.getCertificate());
certs.trimToSize();
! final Certificate[] cert = new Certificate[certs.size()];
! final Iterator iter = certs.iterator();
int i = 0;
while (iter.hasNext()) {
! final Certificate certificate = (java.security.cert.Certificate) iter.next();
cert[i++] = certificate;
}
***************
*** 432,441 ****
*
*/
! public final void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
if (!getSignatory().getPublicKey().equals(publicKey))
throw new SignatureException("Key didnt match Signature");
}
! public final void verify(PublicKey publicKey, String string) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
verify(publicKey);
}
--- 438,447 ----
*
*/
! public final void verify(final PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
if (!getSignatory().getPublicKey().equals(publicKey))
throw new SignatureException("Key didnt match Signature");
}
! public final void verify(final PublicKey publicKey, final String string) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
verify(publicKey);
}
***************
*** 452,456 ****
//TODO I dont like this being public
! public static class Reader implements NamedObjectReader {
/**
* Read object from Element and fill in its details
--- 458,462 ----
//TODO I dont like this being public
! public static final class Reader implements NamedObjectReader {
/**
* Read object from Element and fill in its details
***************
*** 459,471 ****
* @return
*/
! public final SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException {
! 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));
! String receiver = elem.attributeValue(DocumentHelper.createQName("receiver", NSTools.NS_NEUID));
! Element allowElement = elem.element(DocumentHelper.createQName("allow", NSTools.NS_NEUID));
! KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo")));
! PublicKey pub = ki.getPublicKey();
return new Identity(core, repository, signer, logger, receiver, pub);
}
--- 465,477 ----
* @return
*/
! public final SignedNamedObject read(final SignedNamedCore core, final Element elem) throws NeuClearException, XMLSecurityException {
! final String repository = elem.attributeValue(DocumentHelper.createQName("repository", NSTools.NS_NEUID));
! final String signer = elem.attributeValue(DocumentHelper.createQName("signer", NSTools.NS_NEUID));
! final String logger = elem.attributeValue(DocumentHelper.createQName("logger", NSTools.NS_NEUID));
! final String receiver = elem.attributeValue(DocumentHelper.createQName("receiver", NSTools.NS_NEUID));
! final Element allowElement = elem.element(DocumentHelper.createQName("allow", NSTools.NS_NEUID));
! final KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo")));
! final PublicKey pub = ki.getPublicKey();
return new Identity(core, repository, signer, logger, receiver, pub);
}
Index: InvalidNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/InvalidNamedObject.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** InvalidNamedObject.java 15 Nov 2003 01:58:16 -0000 1.1
--- InvalidNamedObject.java 21 Nov 2003 04:45:13 -0000 1.2
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.1 2003/11/15 01:58:16 pelle
* More work all around on web applications.
***************
*** 88,93 ****
import org.neuclear.commons.NeuClearException;
! public class InvalidNamedObject extends NeuClearException {
! public InvalidNamedObject(String msg) {
super(msg);
}
--- 94,99 ----
import org.neuclear.commons.NeuClearException;
! public final class InvalidNamedObject extends NeuClearException {
! public InvalidNamedObject(final String msg) {
super(msg);
}
Index: NSTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NSTools.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** NSTools.java 18 Nov 2003 23:35:45 -0000 1.14
--- NSTools.java 21 Nov 2003 04:45:13 -0000 1.15
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.15 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.14 2003/11/18 23:35:45 pelle
* Payment Web Application is getting there.
***************
*** 164,168 ****
* @throws NeuClearException If name isn't a valid NEU Name
*/
! public static String normalizeNameURI(String name) throws NeuClearException {
if (!isValidName(name))
throw new InvalidNamedObject("Name: '" + name + "' is not valid");
--- 170,174 ----
* @throws NeuClearException If name isn't a valid NEU Name
*/
! public static String normalizeNameURI(final String name) throws NeuClearException {
if (!isValidName(name))
throw new InvalidNamedObject("Name: '" + name + "' is not valid");
***************
*** 182,189 ****
* @return boolean
*/
! public static boolean isValidName(String name) {
if (Utility.isEmpty(name))
return false;
! Matcher matcher = VALID.matcher(name);
return (matcher.matches());
}
--- 188,195 ----
* @return boolean
*/
! public static boolean isValidName(final String name) {
if (Utility.isEmpty(name))
return false;
! final Matcher matcher = VALID.matcher(name);
return (matcher.matches());
}
***************
*** 196,203 ****
* @throws NeuClearException if name is invalid
*/
! public static String getParentNSURI(String name) throws NeuClearException {
! String uri = normalizeNameURI(name);
! int slash = uri.lastIndexOf('/');
! int at = uri.indexOf('@');
if (slash < at)
return uri.substring(0, slash + 1) + uri.substring(at + 1);
--- 202,209 ----
* @throws NeuClearException if name is invalid
*/
! public static String getParentNSURI(final String name) throws NeuClearException {
! final String uri = normalizeNameURI(name);
! final int slash = uri.lastIndexOf('/');
! final int at = uri.indexOf('@');
if (slash < at)
return uri.substring(0, slash + 1) + uri.substring(at + 1);
***************
*** 209,219 ****
}
! public static String createUniqueNamedID(String nameSpace, String reqNameSpace) {
// Yeah, yeah there are better ways to do this
! String ms = new Long(System.currentTimeMillis() + new Random().nextLong()).toString(); //TODO seed the Random number generator
! byte ticketsrc[] = new byte[ms.length() + reqNameSpace.length()];
System.arraycopy(ms.getBytes(), 0, ticketsrc, 0, ms.length());
System.arraycopy(reqNameSpace.getBytes(), 0, ticketsrc, ms.length(), reqNameSpace.length());
! String ticket = CryptoTools.formatAsURLSafe(CryptoTools.digest256(ticketsrc));
//Lets reuse ticketsrc for memory reasons
int offset = ms.length() + 1;
--- 215,225 ----
}
! public static String createUniqueNamedID(final String nameSpace, final String reqNameSpace) {
// Yeah, yeah there are better ways to do this
! final String ms = new Long(System.currentTimeMillis() + new Random().nextLong()).toString(); //TODO seed the Random number generator
! final byte[] ticketsrc = new byte[ms.length() + reqNameSpace.length()];
System.arraycopy(ms.getBytes(), 0, ticketsrc, 0, ms.length());
System.arraycopy(reqNameSpace.getBytes(), 0, ticketsrc, ms.length(), reqNameSpace.length());
! final String ticket = CryptoTools.formatAsURLSafe(CryptoTools.digest256(ticketsrc));
//Lets reuse ticketsrc for memory reasons
int offset = ms.length() + 1;
***************
*** 235,245 ****
}
! public static String url2path(String name) {
if (!Utility.isEmpty(name)) {
! Matcher matcher = STRIP_URI_ARROBA.matcher(name);
if (matcher.matches()) {
return "/" + matcher.group(3) + "/@" + matcher.group(2) + Utility.denullString(matcher.group(4));
}
! int loc = name.indexOf("://");
if (loc >= 0)
return name.substring(loc + 2); //leave in one '/'
--- 241,251 ----
}
! public static String url2path(final String name) {
if (!Utility.isEmpty(name)) {
! final Matcher matcher = STRIP_URI_ARROBA.matcher(name);
if (matcher.matches()) {
return "/" + matcher.group(3) + "/@" + matcher.group(2) + Utility.denullString(matcher.group(4));
}
! final int loc = name.indexOf("://");
if (loc >= 0)
return name.substring(loc + 2); //leave in one '/'
Index: SignatureRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignatureRequest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SignatureRequest.java 20 Nov 2003 16:01:25 -0000 1.5
--- SignatureRequest.java 21 Nov 2003 04:45:13 -0000 1.6
***************
*** 30,33 ****
--- 30,39 ----
$Id$
$Log$
+ Revision 1.6 2003/11/21 04:45:13 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.5 2003/11/20 16:01:25 pelle
Did a security review of the basic Verification process and needed to make changes.
***************
*** 72,76 ****
*/
public final class SignatureRequest extends SignedNamedObject {
! private SignatureRequest(SignedNamedCore core, String userid, NamedObjectBuilder unsigned, String description) throws NeuClearException {
super(core);
this.userid = userid;
--- 78,82 ----
*/
public final class SignatureRequest extends SignedNamedObject {
! private SignatureRequest(final SignedNamedCore core, final String userid, final NamedObjectBuilder unsigned, final String description) throws NeuClearException {
super(core);
this.userid = userid;
***************
*** 98,109 ****
* @return
*/
! public final SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException {
! Element request = elem.element(DocumentHelper.createQName("Unsigned", NSTools.NS_NEUID));
! String userid = elem.attributeValue(DocumentHelper.createQName("userid", NSTools.NS_NEUID));
! Element uelem = ((Element) request.elements().get(0)).createCopy();
! Document doc = DocumentHelper.createDocument(uelem);
! NamedObjectBuilder unsigned = new NamedObjectBuilder(uelem);
String description = null;
! Element descrelem = elem.element(DocumentHelper.createQName("Description", NSTools.NS_NEUID));
if (descrelem != null)
description = descrelem.getText();
--- 104,115 ----
* @return
*/
! public final SignedNamedObject read(final SignedNamedCore core, final Element elem) throws NeuClearException, XMLSecurityException {
! final Element request = elem.element(DocumentHelper.createQName("Unsigned", NSTools.NS_NEUID));
! final String userid = elem.attributeValue(DocumentHelper.createQName("userid", NSTools.NS_NEUID));
! final Element uelem = ((Element) request.elements().get(0)).createCopy();
! final Document doc = DocumentHelper.createDocument(uelem);
! final NamedObjectBuilder unsigned = new NamedObjectBuilder(uelem);
String description = null;
! final Element descrelem = elem.element(DocumentHelper.createQName("Description", NSTools.NS_NEUID));
if (descrelem != null)
description = descrelem.getText();
Index: SignedNamedCore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedCore.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SignedNamedCore.java 20 Nov 2003 16:01:25 -0000 1.1
--- SignedNamedCore.java 21 Nov 2003 04:45:13 -0000 1.2
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.1 2003/11/20 16:01:25 pelle
* Did a security review of the basic Verification process and needed to make changes.
***************
*** 232,236 ****
public final class SignedNamedCore {
! private SignedNamedCore(String name, Identity signer, Timestamp timestamp, String encoded) {
this.name = name;
this.signer = signer;
--- 238,242 ----
public final class SignedNamedCore {
! private SignedNamedCore(final String name, final Identity signer, final Timestamp timestamp, final String encoded) {
this.name = name;
this.signer = signer;
***************
*** 246,256 ****
* @throws NeuClearException
*/
! public final static SignedNamedCore read(Element elem) throws XMLException, NeuClearException {
! String name = NSTools.normalizeNameURI(elem.attributeValue(getNameAttrQName()));
! String signatoryName = NSTools.getParentNSURI(name);
! Identity signatory = NSResolver.resolveIdentity(signatoryName);
if (XMLSecTools.verifySignature(elem, signatory.getPublicKey())) {
! Timestamp timestamp = TimeTools.parseTimeStamp(elem.attributeValue("timestamp"));
return new SignedNamedCore( name, signatory, timestamp,new String(XMLSecTools.canonicalize(elem)));
} else
--- 252,262 ----
* @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);
if (XMLSecTools.verifySignature(elem, signatory.getPublicKey())) {
! final Timestamp timestamp = TimeTools.parseTimeStamp(elem.attributeValue("timestamp"));
return new SignedNamedCore( name, signatory, timestamp,new String(XMLSecTools.canonicalize(elem)));
} else
***************
*** 289,294 ****
*/
public final String getLocalName() {
! String fullName = getName();
! int i = fullName.lastIndexOf('/');
return fullName.substring(i + 1);
}
--- 295,300 ----
*/
public final String getLocalName() {
! final String fullName = getName();
! final int i = fullName.lastIndexOf('/');
return fullName.substring(i + 1);
}
Index: SignedNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedObject.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** SignedNamedObject.java 20 Nov 2003 16:01:25 -0000 1.11
--- SignedNamedObject.java 21 Nov 2003 04:45:13 -0000 1.12
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.12 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.11 2003/11/20 16:01:25 pelle
* Did a security review of the basic Verification process and needed to make changes.
***************
*** 224,228 ****
public class SignedNamedObject implements SignedObject, Named {
! protected SignedNamedObject(SignedNamedCore core) throws NeuClearException {
this.core=core;
}
--- 230,234 ----
public class SignedNamedObject implements SignedObject, Named {
! protected SignedNamedObject(final SignedNamedCore core) throws NeuClearException {
this.core=core;
}
***************
*** 294,298 ****
* @return
*/
! public SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException {
return new SignedNamedObject(core);
}
--- 300,304 ----
* @return
*/
! public SignedNamedObject read(final SignedNamedCore core, final Element elem) throws NeuClearException, XMLSecurityException {
return new SignedNamedObject(core);
}
|
|
From: <pe...@us...> - 2003-11-21 04:45:47
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/signers/commandline
Modified Files:
BuildAllTopLevel.java CommandLineSigner.java
IdentityCreator.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: BuildAllTopLevel.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline/BuildAllTopLevel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** BuildAllTopLevel.java 20 Nov 2003 23:42:24 -0000 1.1
--- BuildAllTopLevel.java 21 Nov 2003 04:45:13 -0000 1.2
***************
*** 33,36 ****
--- 33,42 ----
$Id$
$Log$
+ Revision 1.2 2003/11/21 04:45:13 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.1 2003/11/20 23:42:24 pelle
Getting all the tests to work in id
***************
*** 46,52 ****
* Time: 3:26:45 PM
*/
! public class BuildAllTopLevel {
! public static SignedNamedObject createIdentities(String name, Signer signer, PublicKeySource pubsource) throws NeuClearException, XMLException {
! IdentityBuilder id = new IdentityBuilder(
name,
pubsource.getPublicKey(name),
--- 52,58 ----
* Time: 3:26:45 PM
*/
! public final class BuildAllTopLevel {
! public static SignedNamedObject createIdentities(final String name, final Signer signer, final PublicKeySource pubsource) throws NeuClearException, XMLException {
! final IdentityBuilder id = new IdentityBuilder(
name,
pubsource.getPublicKey(name),
***************
*** 59,71 ****
}
! public static void main(String args[]) {
try {
! JCESigner rootsig = new DefaultSigner(new GuiDialogAgent());
! JCESigner testsig = new TestCaseSigner();
! Store store = new FileStore("target/testdata/repository");
store.receive(createIdentities("neu://", rootsig, rootsig));
store.receive(createIdentities("neu://test", rootsig, testsig));
store.receive(createIdentities("neu://pelle", rootsig, rootsig));
store.receive(createIdentities("neu://verax", rootsig, rootsig));
} catch (NeuClearException e) {
--- 65,79 ----
}
! public static void main(final String[] args) {
try {
! final JCESigner rootsig = new DefaultSigner(new GuiDialogAgent());
! final JCESigner testsig = new TestCaseSigner();
! final Store store = new FileStore("target/testdata/repository");
store.receive(createIdentities("neu://", rootsig, rootsig));
store.receive(createIdentities("neu://test", rootsig, testsig));
store.receive(createIdentities("neu://pelle", rootsig, rootsig));
store.receive(createIdentities("neu://verax", rootsig, rootsig));
+ store.receive(createIdentities("neu://bob@test", testsig, testsig));
+ store.receive(createIdentities("neu://alice@test", testsig, testsig));
} catch (NeuClearException e) {
Index: CommandLineSigner.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline/CommandLineSigner.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** CommandLineSigner.java 13 Nov 2003 23:26:42 -0000 1.13
--- CommandLineSigner.java 21 Nov 2003 04:45:13 -0000 1.14
***************
*** 1,4 ****
--- 1,10 ----
/* $Id$
* $Log$
+ * Revision 1.14 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.13 2003/11/13 23:26:42 pelle
* The signing service and web authentication application is now almost working.
***************
*** 177,185 ****
*/
public class CommandLineSigner {
! public CommandLineSigner(String args[]) throws ParseException, ConfigurationException {
CryptoTools.ensureProvider();
options = createOptions();
! CommandLineParser clparser = CommandLineParserFactory.newParser();
cmd = clparser.parse(options, args);
--- 183,191 ----
*/
public class CommandLineSigner {
! public CommandLineSigner(final String[] args) throws ParseException, ConfigurationException {
CryptoTools.ensureProvider();
options = createOptions();
! final CommandLineParser clparser = CommandLineParserFactory.newParser();
cmd = clparser.parse(options, args);
***************
*** 191,197 ****
}
! public static void main(String args[]) {
try {
! CommandLineSigner signer = new CommandLineSigner(args);
signer.execute();
} catch (Exception e) {
--- 197,203 ----
}
! public static void main(final String[] args) {
try {
! final CommandLineSigner signer = new CommandLineSigner(args);
signer.execute();
} catch (Exception e) {
***************
*** 200,206 ****
}
! public void checkArguments() {
if (!hasArguments()) {
! HelpFormatter help = new HelpFormatter();
help.printHelp("java " +
this.getClass().getName() +
--- 206,212 ----
}
! public final void checkArguments() {
if (!hasArguments()) {
! final HelpFormatter help = new HelpFormatter();
help.printHelp("java " +
this.getClass().getName() +
***************
*** 219,226 ****
}
! public void execute() {
try {
! NamedObjectBuilder subject = build();
if (Utility.isEmpty(alias)) {
--- 225,232 ----
}
! public final void execute() {
try {
! final NamedObjectBuilder subject = build();
if (Utility.isEmpty(alias)) {
***************
*** 237,241 ****
OutputStream dest = System.out;
if (!Utility.isEmpty(of)) {
! File outFile = new File(of);
if (outFile.getParentFile() != null)
outFile.getParentFile().mkdirs();
--- 243,247 ----
OutputStream dest = System.out;
if (!Utility.isEmpty(of)) {
! final File outFile = new File(of);
if (outFile.getParentFile() != null)
outFile.getParentFile().mkdirs();
***************
*** 253,257 ****
protected NamedObjectBuilder build() throws Exception {
! String sf = cmd.getOptionValue("i");
try {
SignedNamedObject subject;
--- 259,263 ----
protected NamedObjectBuilder build() throws Exception {
! final String sf = cmd.getOptionValue("i");
try {
SignedNamedObject subject;
***************
*** 260,264 ****
source = new FileInputStream(sf);
}
! Document doc = XMLTools.loadDocument(source);
return new NamedObjectBuilder(doc);
} catch (FileNotFoundException e) {
--- 266,270 ----
source = new FileInputStream(sf);
}
! final Document doc = XMLTools.loadDocument(source);
return new NamedObjectBuilder(doc);
} catch (FileNotFoundException e) {
***************
*** 274,278 ****
private Options createOptions() {
// create Options object
! Options options = new Options();
// add t option
--- 280,284 ----
private Options createOptions() {
// create Options object
! final Options options = new Options();
// add t option
***************
*** 290,299 ****
}
! protected void getLocalOptions(Options options) {
options.addOption("i", "inputfile", true, "specify Input File");
}
! protected CommandLine cmd;
! protected Options options;
public final static String keystore = System.getProperty("user.home") + "/.keystore";
protected final Signer sig;
--- 296,305 ----
}
! protected void getLocalOptions(final Options options) {
options.addOption("i", "inputfile", true, "specify Input File");
}
! protected final CommandLine cmd;
! protected final Options options;
public final static String keystore = System.getProperty("user.home") + "/.keystore";
protected final Signer sig;
Index: IdentityCreator.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline/IdentityCreator.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** IdentityCreator.java 11 Nov 2003 21:18:43 -0000 1.5
--- IdentityCreator.java 21 Nov 2003 04:45:13 -0000 1.6
***************
*** 1,4 ****
--- 1,10 ----
/* $Id$
* $Log$
+ * Revision 1.6 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.5 2003/11/11 21:18:43 pelle
* Further vital reshuffling.
***************
*** 173,178 ****
* @version $Revision$
*/
! public class IdentityCreator extends CommandLineSigner {
! public IdentityCreator(String args[]) throws Exception {
super(args);
if (!(sig instanceof PublicKeySource))
--- 179,184 ----
* @version $Revision$
*/
! public final class IdentityCreator extends CommandLineSigner {
! public IdentityCreator(final String[] args) throws Exception {
super(args);
if (!(sig instanceof PublicKeySource))
***************
*** 180,185 ****
pksource = (PublicKeySource) sig;
identity = cmd.getOptionValue("n");
! String cachedirpath = System.getProperty("user.home") + "/.neuclear/cache";
! File cachedir = new File(cachedirpath);
if (!cachedir.exists())
cachedir.mkdirs();
--- 186,191 ----
pksource = (PublicKeySource) sig;
identity = cmd.getOptionValue("n");
! final String cachedirpath = System.getProperty("user.home") + "/.neuclear/cache";
! final File cachedir = new File(cachedirpath);
if (!cachedir.exists())
cachedir.mkdirs();
***************
*** 191,200 ****
}
! public NamedObjectBuilder build() throws Exception {
! String allow = Utility.denullString(cmd.getOptionValue("w"), identity);
! String defaultstore = Utility.denullString(cmd.getOptionValue("r"), NSResolver.NSROOTSTORE);
! String defaultsigner = Utility.denullString(cmd.getOptionValue("i"), "http://localhost:11870/signer");
! String defaultlogger = Utility.denullString(cmd.getOptionValue("l"), LogSender.LOGGER);
! String defaultreceiver = cmd.getOptionValue("b");
final PublicKey newkid = pksource.getPublicKey(allow);
if (newkid == null)
--- 197,206 ----
}
! public final NamedObjectBuilder build() throws Exception {
! final String allow = Utility.denullString(cmd.getOptionValue("w"), identity);
! final String defaultstore = Utility.denullString(cmd.getOptionValue("r"), NSResolver.NSROOTSTORE);
! final String defaultsigner = Utility.denullString(cmd.getOptionValue("i"), "http://localhost:11870/signer");
! final String defaultlogger = Utility.denullString(cmd.getOptionValue("l"), LogSender.LOGGER);
! final String defaultreceiver = cmd.getOptionValue("b");
final PublicKey newkid = pksource.getPublicKey(allow);
if (newkid == null)
***************
*** 204,210 ****
}
! public static void main(String args[]) {
try {
! IdentityCreator signer = new IdentityCreator(args);
signer.execute();
} catch (Exception e) {
--- 210,216 ----
}
! public static void main(final String[] args) {
try {
! final IdentityCreator signer = new IdentityCreator(args);
signer.execute();
} catch (Exception e) {
***************
*** 214,226 ****
}
! protected String getExtraHelp() {
return "[--name neu://neu/one --allow neuone]";
}
! protected boolean hasArguments() {
return (cmd.hasOption("n") && cmd.hasOption("b"));
}
! protected void getLocalOptions(Options options) {
options.addOption("n", "name", true, "specify name of new Identity");
options.addOption("w", "allow", true, "specify alias of owner of new namespace");
--- 220,232 ----
}
! protected final String getExtraHelp() {
return "[--name neu://neu/one --allow neuone]";
}
! protected final boolean hasArguments() {
return (cmd.hasOption("n") && cmd.hasOption("b"));
}
! protected final void getLocalOptions(final Options options) {
options.addOption("n", "name", true, "specify name of new Identity");
options.addOption("w", "allow", true, "specify alias of owner of new namespace");
|
|
From: <pe...@us...> - 2003-11-21 04:45:46
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/senders
Modified Files:
LogSender.java Sender.java SmtpSender.java SoapSender.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: LogSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/LogSender.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** LogSender.java 19 Nov 2003 23:33:59 -0000 1.11
--- LogSender.java 21 Nov 2003 04:45:13 -0000 1.12
***************
*** 22,25 ****
--- 22,31 ----
* $Id$
* $Log$
+ * Revision 1.12 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.11 2003/11/19 23:33:59 pelle
* Signers now can generatekeys via the generateKey() method.
***************
*** 92,101 ****
* default receiver.
*/
! public class LogSender extends Sender {
! public SignedNamedObject send(String endpoint, SignedNamedObject obj) throws NeuClearException {
try {
! String digest = URLEncoder.encode(Base64.encode(obj.getDigest()), "UTF-8");
! String name = URLEncoder.encode(obj.getName(), "UTF-8");
! URL url = new URL(Utility.denullString(endpoint, LOGGER) + "?nohtml=1&name=" + name + "&digest=" + digest);
url.openStream();
--- 98,107 ----
* default receiver.
*/
! public final class LogSender extends Sender {
! public final SignedNamedObject send(final String endpoint, final SignedNamedObject obj) throws NeuClearException {
try {
! final String digest = URLEncoder.encode(Base64.encode(obj.getDigest()), "UTF-8");
! final String name = URLEncoder.encode(obj.getName(), "UTF-8");
! final URL url = new URL(Utility.denullString(endpoint, LOGGER) + "?nohtml=1&name=" + name + "&digest=" + digest);
url.openStream();
***************
*** 127,143 ****
*/
! public static Timestamp getTimeStamp(String endpoint, byte rdigest[]) throws NeuClearException {
try {
! String digest = Base64.encode(rdigest);
// System.out.println(digest);
! String encdigest = URLEncoder.encode(digest, "UTF-8");
URL url = null;
url = new URL(LOGGER + "?mode=Query&nohtml=1&digest=" + encdigest);
! BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
! String line = reader.readLine();
// System.out.println(line);
! int pos = line.indexOf('\t');
if (pos >= 0) {
! String stamp = line.substring(0, pos);
return TimeTools.parseTimeStamp(stamp);
}
--- 133,149 ----
*/
! public static Timestamp getTimeStamp(final String endpoint, final byte[] rdigest) throws NeuClearException {
try {
! final String digest = Base64.encode(rdigest);
// System.out.println(digest);
! final String encdigest = URLEncoder.encode(digest, "UTF-8");
URL url = null;
url = new URL(LOGGER + "?mode=Query&nohtml=1&digest=" + encdigest);
! final BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
! final String line = reader.readLine();
// System.out.println(line);
! final int pos = line.indexOf('\t');
if (pos >= 0) {
! final String stamp = line.substring(0, pos);
return TimeTools.parseTimeStamp(stamp);
}
***************
*** 151,155 ****
}
! public static Timestamp getTimeStamp(SignedNamedObject obj) throws NeuClearException {
return getTimeStamp(Utility.denullString(obj.getSignatory().getLogger(), LOGGER), obj.getEncoded().getBytes());
--- 157,161 ----
}
! public static Timestamp getTimeStamp(final SignedNamedObject obj) throws NeuClearException {
return getTimeStamp(Utility.denullString(obj.getSignatory().getLogger(), LOGGER), obj.getEncoded().getBytes());
Index: Sender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/Sender.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Sender.java 19 Nov 2003 23:33:59 -0000 1.11
--- Sender.java 21 Nov 2003 04:45:13 -0000 1.12
***************
*** 8,11 ****
--- 8,17 ----
* $Id$
* $Log$
+ * Revision 1.12 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.11 2003/11/19 23:33:59 pelle
* Signers now can generatekeys via the generateKey() method.
***************
*** 72,81 ****
public abstract SignedNamedObject send(String endpoint, SignedNamedObject obj) throws NeuClearException, XMLException;
! public static SignedNamedObject quickSend(String endpoint, SignedNamedObject obj) throws NeuClearException {
! int protloc = endpoint.indexOf(":");
if (protloc < 0)
throw new NeuClearException(endpoint + "Is not in URL format");
! String protocol = endpoint.substring(0, protloc);
! Sender sender = getSender(protocol);
if (sender == null)
throw new NeuClearException("Unsupported Send Protocol:" + endpoint.toString());
--- 78,87 ----
public abstract SignedNamedObject send(String endpoint, SignedNamedObject obj) throws NeuClearException, XMLException;
! public static SignedNamedObject quickSend(final String endpoint, final SignedNamedObject obj) throws NeuClearException {
! final int protloc = endpoint.indexOf(":");
if (protloc < 0)
throw new NeuClearException(endpoint + "Is not in URL format");
! final String protocol = endpoint.substring(0, protloc);
! final Sender sender = getSender(protocol);
if (sender == null)
throw new NeuClearException("Unsupported Send Protocol:" + endpoint.toString());
***************
*** 87,91 ****
}
! public static Sender getSender(String protocol) {
if (SENDERS == null) {
SENDERS = new HashMap();
--- 93,97 ----
}
! public static Sender getSender(final String protocol) {
if (SENDERS == null) {
SENDERS = new HashMap();
***************
*** 100,104 ****
private static Map SENDERS;
! public static void main(String args[]) {
/*
try {
--- 106,110 ----
private static Map SENDERS;
! public static void main(final String[] args) {
/*
try {
Index: SmtpSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/SmtpSender.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** SmtpSender.java 19 Nov 2003 23:33:59 -0000 1.13
--- SmtpSender.java 21 Nov 2003 04:45:13 -0000 1.14
***************
*** 8,11 ****
--- 8,17 ----
* $Id$
* $Log$
+ * Revision 1.14 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.13 2003/11/19 23:33:59 pelle
* Signers now can generatekeys via the generateKey() method.
***************
*** 111,117 ****
import java.util.Properties;
! public class SmtpSender extends Sender {
! public SignedNamedObject send(String endpoint, SignedNamedObject obj) throws NeuClearException {
! Properties props = System.getProperties();
if (endpoint.startsWith("mailto:"))
endpoint = endpoint.substring(7);
--- 117,123 ----
import java.util.Properties;
! public final class SmtpSender extends Sender {
! public final SignedNamedObject send(String endpoint, final SignedNamedObject obj) throws NeuClearException {
! final Properties props = System.getProperties();
if (endpoint.startsWith("mailto:"))
endpoint = endpoint.substring(7);
***************
*** 119,127 ****
props.put("mail.smtp.host", "neuclear.org");// TODO Remove this hardcoded mail server
! Session session = Session.getDefaultInstance(props, null);
try {
// -- Create a new message --
! Message msg = new MimeMessage(session);
// -- Set the FROM and TO fields --
--- 125,133 ----
props.put("mail.smtp.host", "neuclear.org");// TODO Remove this hardcoded mail server
! final Session session = Session.getDefaultInstance(props, null);
try {
// -- Create a new message --
! final Message msg = new MimeMessage(session);
// -- Set the FROM and TO fields --
***************
*** 137,146 ****
// -- Set the subject and body text --
msg.setSubject("You have received a New Named Object: " + obj.getName());
! BodyPart body = new MimeBodyPart();
body.setText("This message contains a signed named object. Please see http://neuclear.org for more info.");
! Multipart multi = new MimeMultipart();
multi.addBodyPart(body);
! BodyPart objpart = new MimeBodyPart();
objpart.setText(obj.getEncoded());
objpart.setHeader("Content-type", "application/nsdl");
--- 143,152 ----
// -- Set the subject and body text --
msg.setSubject("You have received a New Named Object: " + obj.getName());
! final BodyPart body = new MimeBodyPart();
body.setText("This message contains a signed named object. Please see http://neuclear.org for more info.");
! final Multipart multi = new MimeMultipart();
multi.addBodyPart(body);
! final BodyPart objpart = new MimeBodyPart();
objpart.setText(obj.getEncoded());
objpart.setHeader("Content-type", "application/nsdl");
Index: SoapSender.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/SoapSender.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** SoapSender.java 19 Nov 2003 23:33:59 -0000 1.12
--- SoapSender.java 21 Nov 2003 04:45:13 -0000 1.13
***************
*** 8,11 ****
--- 8,17 ----
* $Id$
* $Log$
+ * Revision 1.13 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.12 2003/11/19 23:33:59 pelle
* Signers now can generatekeys via the generateKey() method.
***************
*** 100,105 ****
! public class SoapSender extends Sender {
! public SignedNamedObject send(String endpoint, SignedNamedObject obj) throws NeuClearException, XMLException {
return VerifyingReader.getInstance().read(SOAPTools.soapRequest(endpoint, obj.getEncoded(), "/receive"));
--- 106,111 ----
! public final class SoapSender extends Sender {
! public final SignedNamedObject send(final String endpoint, final SignedNamedObject obj) throws NeuClearException, XMLException {
return VerifyingReader.getInstance().read(SOAPTools.soapRequest(endpoint, obj.getEncoded(), "/receive"));
|
|
From: <pe...@us...> - 2003-11-21 04:45:46
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/id/verifier
Modified Files:
VerifyingReader.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: VerifyingReader.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier/VerifyingReader.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** VerifyingReader.java 20 Nov 2003 23:42:24 -0000 1.12
--- VerifyingReader.java 21 Nov 2003 04:45:12 -0000 1.13
***************
*** 32,35 ****
--- 32,41 ----
$Id$
$Log$
+ Revision 1.13 2003/11/21 04:45:12 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.12 2003/11/20 23:42:24 pelle
Getting all the tests to work in id
***************
*** 108,112 ****
* Time: 4:47:15 PM
*/
! public class VerifyingReader {
private VerifyingReader() {
readers = new HashMap();
--- 114,118 ----
* Time: 4:47:15 PM
*/
! public final class VerifyingReader {
private VerifyingReader() {
readers = new HashMap();
***************
*** 129,143 ****
* @throws NeuClearException
*/
! public final SignedNamedObject read(InputStream is) throws XMLException, NeuClearException {
! Element elem = XMLTools.loadDocument(is).getRootElement();
return read(elem);
}
! public final SignedNamedObject read(Element elem) throws NeuClearException, XMLException {
return resolveReader(elem).read(SignedNamedCore.read(elem), elem);
}
! private NamedObjectReader resolveReader(Element elem) {
NamedObjectReader reader = (NamedObjectReader) readers.get(elem.getName());
if (reader == null)
--- 135,149 ----
* @throws NeuClearException
*/
! public final SignedNamedObject read(final InputStream is) throws XMLException, NeuClearException {
! final Element elem = XMLTools.loadDocument(is).getRootElement();
return read(elem);
}
! public final SignedNamedObject read(final Element elem) throws NeuClearException, XMLException {
return resolveReader(elem).read(SignedNamedCore.read(elem), elem);
}
! private NamedObjectReader resolveReader(final Element elem) {
NamedObjectReader reader = (NamedObjectReader) readers.get(elem.getName());
if (reader == null)
***************
*** 147,156 ****
! public void registerReader(String name, NamedObjectReader reader) {
readers.put(name, reader);
}
! private Map readers;
! private NamedObjectReader defaultReader;
! private static VerifyingReader instance = new VerifyingReader();
}
--- 153,163 ----
! public final void registerReader(final String name, final NamedObjectReader reader) {
! System.out.println("Registering: "+name);
readers.put(name, reader);
}
! private final Map readers;
! private final NamedObjectReader defaultReader;
! private static final VerifyingReader instance = new VerifyingReader();
}
|
|
From: <pe...@us...> - 2003-11-21 04:45:46
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/receiver
Modified Files:
ReceiverServlet.java UnsupportedTransaction.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: ReceiverServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/receiver/ReceiverServlet.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ReceiverServlet.java 11 Nov 2003 21:18:43 -0000 1.6
--- ReceiverServlet.java 21 Nov 2003 04:45:13 -0000 1.7
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.7 2003/11/21 04:45:13 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.6 2003/11/11 21:18:43 pelle
* Further vital reshuffling.
***************
*** 91,99 ****
public abstract class ReceiverServlet extends XMLInputStreamServlet {
! public void init(ServletConfig config) throws ServletException {
super.init(config);
}
! protected void handleInputStream(InputStream is, HttpServletRequest request, HttpServletResponse response) throws IOException {
try {
receiver.receive(VerifyingReader.getInstance().read(is));
--- 97,105 ----
public abstract class ReceiverServlet extends XMLInputStreamServlet {
! public void init(final ServletConfig config) throws ServletException {
super.init(config);
}
! protected final void handleInputStream(final InputStream is, final HttpServletRequest request, final HttpServletResponse response) throws IOException {
try {
receiver.receive(VerifyingReader.getInstance().read(is));
***************
*** 106,114 ****
}
! protected void setReceiver(Receiver receiver) {
this.receiver = receiver;
}
! protected Receiver getReceiver() {
return receiver;
}
--- 112,120 ----
}
! protected final void setReceiver(final Receiver receiver) {
this.receiver = receiver;
}
! protected final Receiver getReceiver() {
return receiver;
}
Index: UnsupportedTransaction.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/receiver/UnsupportedTransaction.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** UnsupportedTransaction.java 9 Nov 2003 03:27:19 -0000 1.3
--- UnsupportedTransaction.java 21 Nov 2003 04:45:13 -0000 1.4
***************
*** 24,27 ****
--- 24,33 ----
$Id$
$Log$
+ Revision 1.4 2003/11/21 04:45:13 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.3 2003/11/09 03:27:19 pelle
More house keeping and shuffling about mainly pay
***************
*** 44,53 ****
* Time: 1:48:58 PM
*/
! public class UnsupportedTransaction extends NeuClearException {
/**
*
* @param obj
*/
! public UnsupportedTransaction(SignedNamedObject obj) {
super("NeuClear Transaction not Supported by this Receiver: " + obj.getClass().getName());
}
--- 50,59 ----
* Time: 1:48:58 PM
*/
! public final class UnsupportedTransaction extends NeuClearException {
/**
*
* @param obj
*/
! public UnsupportedTransaction(final SignedNamedObject obj) {
super("NeuClear Transaction not Supported by this Receiver: " + obj.getClass().getName());
}
|
|
From: <pe...@us...> - 2003-11-21 04:45:46
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/id/resolver
Modified Files:
NSResolver.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: NSResolver.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver/NSResolver.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** NSResolver.java 15 Nov 2003 01:58:16 -0000 1.10
--- NSResolver.java 21 Nov 2003 04:45:11 -0000 1.11
***************
*** 25,30 ****
* @return
*/
! public final static Identity resolveIdentity(String name) throws NeuClearException, InvalidNamedObject {
! SignedNamedObject id = resolve(name);
if (id instanceof Identity)
return (Identity) id;
--- 25,30 ----
* @return
*/
! public final static Identity resolveIdentity(final String name) throws NeuClearException, InvalidNamedObject {
! final SignedNamedObject id = resolve(name);
if (id instanceof Identity)
return (Identity) id;
***************
*** 40,49 ****
* @return
*/
! public final static SignedNamedObject resolve(String name) throws NeuClearException, InvalidNamedObject {
SignedNamedObject obj = NSCACHE.fetchCached(name);
if (obj != null)
return obj;
! String parentname = NSTools.getParentNSURI(name);
String store = NSROOTSTORE;
--- 40,49 ----
* @return
*/
! public final static SignedNamedObject resolve(final String name) throws NeuClearException, InvalidNamedObject {
SignedNamedObject obj = NSCACHE.fetchCached(name);
if (obj != null)
return obj;
! final String parentname = NSTools.getParentNSURI(name);
String store = NSROOTSTORE;
***************
*** 51,55 ****
return Identity.NEUROOT;
! Identity parent = resolveIdentity(parentname);
store = parent.getRepository();
// fetches Identity from parent Identity's Default Store
--- 51,55 ----
return Identity.NEUROOT;
! final Identity parent = resolveIdentity(parentname);
store = parent.getRepository();
// fetches Identity from parent Identity's Default Store
|
|
From: <pe...@us...> - 2003-11-21 04:45:45
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/auth
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/auth
Modified Files:
AuthenticationFilter.java AuthenticationServlet.java
AuthenticationTicket.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AuthenticationFilter.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/auth/AuthenticationFilter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AuthenticationFilter.java 15 Nov 2003 01:58:16 -0000 1.1
--- AuthenticationFilter.java 21 Nov 2003 04:45:10 -0000 1.2
***************
*** 35,38 ****
--- 35,44 ----
$Id$
$Log$
+ Revision 1.2 2003/11/21 04:45:10 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.1 2003/11/15 01:58:16 pelle
More work all around on web applications.
***************
*** 45,50 ****
* Time: 3:56:48 PM
*/
! public class AuthenticationFilter implements Filter {
! public void init(FilterConfig filterConfig) throws ServletException {
serviceid = filterConfig.getInitParameter("serviceid");
ctx = filterConfig.getServletContext();
--- 51,56 ----
* Time: 3:56:48 PM
*/
! public final class AuthenticationFilter implements Filter {
! public final void init(final FilterConfig filterConfig) throws ServletException {
serviceid = filterConfig.getInitParameter("serviceid");
ctx = filterConfig.getServletContext();
***************
*** 53,58 ****
}
! public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
! HttpSession sess = ((HttpServletRequest) request).getSession(true);
ctx.log("AUTH: Filtering request: " + ((HttpServletRequest) request).getServletPath());
--- 59,64 ----
}
! public final void doFilter(ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException {
! final HttpSession sess = ((HttpServletRequest) request).getSession(true);
ctx.log("AUTH: Filtering request: " + ((HttpServletRequest) request).getServletPath());
***************
*** 95,99 ****
}
! public void destroy() {
}
--- 101,105 ----
}
! public final void destroy() {
}
Index: AuthenticationServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/auth/AuthenticationServlet.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AuthenticationServlet.java 18 Nov 2003 23:35:45 -0000 1.5
--- AuthenticationServlet.java 21 Nov 2003 04:45:10 -0000 1.6
***************
*** 43,46 ****
--- 43,52 ----
$Id$
$Log$
+ Revision 1.6 2003/11/21 04:45:10 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.5 2003/11/18 23:35:45 pelle
Payment Web Application is getting there.
***************
*** 70,75 ****
* Time: 2:04:31 PM
*/
! public class AuthenticationServlet extends HttpServlet {
! public void init(ServletConfig servletConfig) throws ServletException {
super.init(servletConfig);
serviceid = servletConfig.getInitParameter("serviceid");
--- 76,81 ----
* Time: 2:04:31 PM
*/
! public final class AuthenticationServlet extends HttpServlet {
! public final void init(final ServletConfig servletConfig) throws ServletException {
super.init(servletConfig);
serviceid = servletConfig.getInitParameter("serviceid");
***************
*** 86,100 ****
}
! protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
! protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
response.setContentType("text/html");
! String siteurl = ServletTools.getAbsoluteURL(request, "/");
! String userns = request.getParameter("identity");
if (Utility.isEmpty(userns)) {
response.sendError(500, "No Identity");
--- 92,106 ----
}
! protected final void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
}
! protected final void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
response.setContentType("text/html");
! final String siteurl = ServletTools.getAbsoluteURL(request, "/");
! final String userns = request.getParameter("identity");
if (Utility.isEmpty(userns)) {
response.sendError(500, "No Identity");
***************
*** 102,110 ****
return;
}
! Cookie usercookie = new Cookie("identity", userns);
//usercookie.setSecure(true);
usercookie.setMaxAge(2592000);
response.addCookie(usercookie);
! PrintWriter out = response.getWriter();
out.write("\n ");
out.write("<html>\n");
--- 108,116 ----
return;
}
! final Cookie usercookie = new Cookie("identity", userns);
//usercookie.setSecure(true);
usercookie.setMaxAge(2592000);
response.addCookie(usercookie);
! final PrintWriter out = response.getWriter();
out.write("\n ");
out.write("<html>\n");
***************
*** 120,125 ****
try {
! AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder(userns, serviceid, request.getRequestURI());
! SignatureRequestBuilder sigreq = new SignatureRequestBuilder(serviceid, userns, authreq, "Login to Site");
sigreq.sign(serviceid, signer);
request.getSession(true).setAttribute("auth", userns);
--- 126,131 ----
try {
! final AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder(userns, serviceid, request.getRequestURI());
! final SignatureRequestBuilder sigreq = new SignatureRequestBuilder(serviceid, userns, authreq, "Login to Site");
sigreq.sign(serviceid, signer);
request.getSession(true).setAttribute("auth", userns);
Index: AuthenticationTicket.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/auth/AuthenticationTicket.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AuthenticationTicket.java 20 Nov 2003 16:01:25 -0000 1.4
--- AuthenticationTicket.java 21 Nov 2003 04:45:10 -0000 1.5
***************
*** 42,46 ****
* @throws NeuClearException
*/
! private AuthenticationTicket(SignedNamedCore core, String requester, Timestamp validto, String siteurl) throws NeuClearException {
super(core);
this.validTo = validto;
--- 42,46 ----
* @throws NeuClearException
*/
! private AuthenticationTicket(final SignedNamedCore core, final String requester, final Timestamp validto, final String siteurl) throws NeuClearException {
super(core);
this.validTo = validto;
***************
*** 77,84 ****
* @return
*/
! public final SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException {
! String requester = elem.attributeValue(DocumentHelper.createQName("requester", NS_NSAUTH));
! String sitehref = elem.attributeValue(DocumentHelper.createQName("sitehref", NS_NSAUTH));
! Timestamp validto = TimeTools.parseTimeStamp(elem.attributeValue(DocumentHelper.createQName("validto", NS_NSAUTH)));
return new AuthenticationTicket(core, requester, validto, sitehref);
--- 77,84 ----
* @return
*/
! public final SignedNamedObject read(final SignedNamedCore core, final Element elem) throws NeuClearException, XMLSecurityException {
! final String requester = elem.attributeValue(DocumentHelper.createQName("requester", NS_NSAUTH));
! final String sitehref = elem.attributeValue(DocumentHelper.createQName("sitehref", NS_NSAUTH));
! final Timestamp validto = TimeTools.parseTimeStamp(elem.attributeValue(DocumentHelper.createQName("validto", NS_NSAUTH)));
return new AuthenticationTicket(core, requester, validto, sitehref);
|
|
From: <pe...@us...> - 2003-11-21 04:45:45
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/jce
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/id/jce
Modified Files:
NeuClearCertificateFactory.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: NeuClearCertificateFactory.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/jce/NeuClearCertificateFactory.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** NeuClearCertificateFactory.java 18 Nov 2003 15:45:09 -0000 1.6
--- NeuClearCertificateFactory.java 21 Nov 2003 04:45:11 -0000 1.7
***************
*** 35,38 ****
--- 35,44 ----
$Id$
$Log$
+ Revision 1.7 2003/11/21 04:45:11 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.6 2003/11/18 15:45:09 pelle
FileStoreTest now passes. FileStore works again.
***************
*** 74,84 ****
* Time: 4:39:08 PM
*/
! public class NeuClearCertificateFactory extends CertificateFactorySpi {
! final public Certificate engineGenerateCertificate(InputStream inputStream) throws CertificateException {
try {
//Identity id=(Identity) VerifyingReader.getInstance().read(inputStream);
! BufferedReader d = new BufferedReader(new InputStreamReader(inputStream));
if (d.ready()) {
! String name = d.readLine();
if (name==null)
throw new CertificateEncodingException("Certificate is empty");
--- 80,90 ----
* Time: 4:39:08 PM
*/
! public final class NeuClearCertificateFactory extends CertificateFactorySpi {
! final public Certificate engineGenerateCertificate(final InputStream inputStream) throws CertificateException {
try {
//Identity id=(Identity) VerifyingReader.getInstance().read(inputStream);
! final BufferedReader d = new BufferedReader(new InputStreamReader(inputStream));
if (d.ready()) {
! final String name = d.readLine();
if (name==null)
throw new CertificateEncodingException("Certificate is empty");
***************
*** 99,104 ****
}
! final public Collection engineGenerateCertificates(InputStream inputStream) throws CertificateException {
! List list=new LinkedList();
try {
while(inputStream.available()>0) {
--- 105,110 ----
}
! final public Collection engineGenerateCertificates(final InputStream inputStream) throws CertificateException {
! final List list=new LinkedList();
try {
while(inputStream.available()>0) {
***************
*** 111,119 ****
}
! final public CRL engineGenerateCRL(InputStream inputStream) throws CRLException {
return null;
}
! final public Collection engineGenerateCRLs(InputStream inputStream) throws CRLException {
return new ArrayList(0);
}
--- 117,125 ----
}
! final public CRL engineGenerateCRL(final InputStream inputStream) throws CRLException {
return null;
}
! final public Collection engineGenerateCRLs(final InputStream inputStream) throws CRLException {
return new ArrayList(0);
}
|
|
From: <pe...@us...> - 2003-11-21 04:45:45
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/cache
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/id/cache
Modified Files:
NSCache.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: NSCache.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/cache/NSCache.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** NSCache.java 11 Nov 2003 21:18:42 -0000 1.5
--- NSCache.java 21 Nov 2003 04:45:10 -0000 1.6
***************
*** 28,32 ****
* @return a valid Identity object if found otherwise null
*/
! public SignedNamedObject fetchCached(String name) {
try { // I dont like the way it forces me to catch this. I need to rewrite it.
return (Identity) spaces.fetch(name);
--- 28,32 ----
* @return a valid Identity object if found otherwise null
*/
! public SignedNamedObject fetchCached(final String name) {
try { // I dont like the way it forces me to catch this. I need to rewrite it.
return (Identity) spaces.fetch(name);
***************
*** 36,42 ****
}
! public void cache(SignedNamedObject ns) throws NeuClearException {
// Only store if it's parent is already here
! String parentName = NSTools.getParentNSURI(ns.getName());
if ((fetchCached(parentName) != null) || (parentName.equals("neu://"))) {
spaces.put(ns.getName(), ns);
--- 36,42 ----
}
! public void cache(final SignedNamedObject ns) throws NeuClearException {
// Only store if it's parent is already here
! final String parentName = NSTools.getParentNSURI(ns.getName());
if ((fetchCached(parentName) != null) || (parentName.equals("neu://"))) {
spaces.put(ns.getName(), ns);
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/id/builders
Modified Files:
AuthenticationTicketBuilder.java IdentityBuilder.java
NamedObjectBuilder.java SignatureRequestBuilder.java
TargetReference.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AuthenticationTicketBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/AuthenticationTicketBuilder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AuthenticationTicketBuilder.java 11 Nov 2003 21:18:42 -0000 1.2
--- AuthenticationTicketBuilder.java 21 Nov 2003 04:45:10 -0000 1.3
***************
*** 31,34 ****
--- 31,40 ----
$Id$
$Log$
+ Revision 1.3 2003/11/21 04:45:10 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.2 2003/11/11 21:18:42 pelle
Further vital reshuffling.
***************
*** 48,57 ****
* Time: 11:59:58 AM
*/
! public class AuthenticationTicketBuilder extends NamedObjectBuilder {
! public AuthenticationTicketBuilder(String user, String requester, String site) throws NeuClearException {
this(user, requester, new Timestamp(new Date().getTime() + 1800000), site);
}
! public AuthenticationTicketBuilder(String user, String requester, Date validto, String site) throws NeuClearException {
super(NSTools.createUniqueNamedID(user, requester), AuthenticationTicket.TAG_NAME, AuthenticationTicket.NS_NSAUTH);
getElement().addAttribute(createQName("requester"), NSTools.normalizeNameURI(requester));
--- 54,63 ----
* Time: 11:59:58 AM
*/
! public final class AuthenticationTicketBuilder extends NamedObjectBuilder {
! public AuthenticationTicketBuilder(final String user, final String requester, final String site) throws NeuClearException {
this(user, requester, new Timestamp(new Date().getTime() + 1800000), site);
}
! public AuthenticationTicketBuilder(final String user, final String requester, final Date validto, final String site) throws NeuClearException {
super(NSTools.createUniqueNamedID(user, requester), AuthenticationTicket.TAG_NAME, AuthenticationTicket.NS_NSAUTH);
getElement().addAttribute(createQName("requester"), NSTools.normalizeNameURI(requester));
***************
*** 60,68 ****
}
! private static QName createQName(String name) {
return DocumentHelper.createQName(name, AuthenticationTicket.NS_NSAUTH);
}
! public String getTagName() {
return AuthenticationTicket.TAG_NAME;
}
--- 66,74 ----
}
! private static QName createQName(final String name) {
return DocumentHelper.createQName(name, AuthenticationTicket.NS_NSAUTH);
}
! public final String getTagName() {
return AuthenticationTicket.TAG_NAME;
}
Index: IdentityBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/IdentityBuilder.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** IdentityBuilder.java 11 Nov 2003 21:18:42 -0000 1.7
--- IdentityBuilder.java 21 Nov 2003 04:45:10 -0000 1.8
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.8 2003/11/21 04:45:10 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.7 2003/11/11 21:18:42 pelle
* Further vital reshuffling.
***************
*** 168,171 ****
--- 174,178 ----
import org.neuclear.id.NSTools;
import org.neuclear.commons.Utility;
+ import org.neuclear.commons.NeuClearException;
import org.neuclear.xml.XMLException;
import org.neuclear.xml.xmlsec.XMLSecTools;
***************
*** 185,189 ****
*/
! public IdentityBuilder(String name, PublicKey allow, String repository, String signer, String logger, String receiver) {
this(DocumentHelper.createQName("Identity",NSTools.NS_NEUID), name,allow,repository,signer,logger,receiver);
--- 192,196 ----
*/
! public IdentityBuilder(final String name, final PublicKey allow, final String repository, final String signer, final String logger, final String receiver) throws NeuClearException {
this(DocumentHelper.createQName("Identity",NSTools.NS_NEUID), name,allow,repository,signer,logger,receiver);
***************
*** 198,205 ****
* @param receiver URL of default receiver for namespace
*/
! protected IdentityBuilder(QName tag,String name, PublicKey allow, String repository, String signer, String logger, String receiver) {
super(name, tag);
! Element root = getElement();
// We have meaningful defaults for the following two
root.addAttribute(DocumentHelper.createQName("repository", NSTools.NS_NEUID), repository);
--- 205,212 ----
* @param receiver URL of default receiver for namespace
*/
! protected IdentityBuilder(final QName tag,final String name, final PublicKey allow, final String repository, final String signer, final String logger, final String receiver) throws NeuClearException {
super(name, tag);
! final Element root = getElement();
// We have meaningful defaults for the following two
root.addAttribute(DocumentHelper.createQName("repository", NSTools.NS_NEUID), repository);
***************
*** 212,241 ****
if (allow != null) {
! QName allowName = DocumentHelper.createQName("allow", NSTools.NS_NEUID);
! Element pub = root.addElement(allowName);
pub.add(XMLSecTools.createKeyInfo(allow));
}
}
! public IdentityBuilder(String name, PublicKey allow, String repository) throws XMLSecurityException {
this(name, allow, repository, null, null, null);
}
! public IdentityBuilder(String name, PublicKey allow) throws XMLSecurityException {
this(name, allow, null);
}
! public String getTagName() {
return "Identity";
}
! public static void main(String args[]) {
System.out.println("Test Building NeuClear Identities");
try {
! NamedObjectBuilder id = new IdentityBuilder("neu://", Identity.NEUROOT.getPublicKey());
System.out.println(new String(id.canonicalize()));
} catch (XMLException e) {
e.printStackTrace();
}
}
--- 219,250 ----
if (allow != null) {
! final QName allowName = DocumentHelper.createQName("allow", NSTools.NS_NEUID);
! final Element pub = root.addElement(allowName);
pub.add(XMLSecTools.createKeyInfo(allow));
}
}
! public IdentityBuilder(final String name, final PublicKey allow, final String repository) throws XMLSecurityException, NeuClearException {
this(name, allow, repository, null, null, null);
}
! public IdentityBuilder(final String name, final PublicKey allow) throws XMLSecurityException, NeuClearException {
this(name, allow, null);
}
! public final String getTagName() {
return "Identity";
}
! public static void main(final String[] args) {
System.out.println("Test Building NeuClear Identities");
try {
! final NamedObjectBuilder id = new IdentityBuilder("neu://", Identity.NEUROOT.getPublicKey());
System.out.println(new String(id.canonicalize()));
} catch (XMLException e) {
e.printStackTrace();
+ } catch (NeuClearException e) {
+ e.printStackTrace(); //TODO Handle exception
}
}
Index: NamedObjectBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/NamedObjectBuilder.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** NamedObjectBuilder.java 20 Nov 2003 23:42:24 -0000 1.10
--- NamedObjectBuilder.java 21 Nov 2003 04:45:10 -0000 1.11
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.11 2003/11/21 04:45:10 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.10 2003/11/20 23:42:24 pelle
* Getting all the tests to work in id
***************
*** 192,196 ****
*/
public class NamedObjectBuilder extends SignedElement implements Named {
! public NamedObjectBuilder(String name, String tagName, String prefix, String nsURI) {
super(tagName, prefix, nsURI);
createDocument();
--- 198,202 ----
*/
public class NamedObjectBuilder extends SignedElement implements Named {
! public NamedObjectBuilder(final String name, final String tagName, final String prefix, final String nsURI) throws NeuClearException {
super(tagName, prefix, nsURI);
createDocument();
***************
*** 198,202 ****
}
! public NamedObjectBuilder(String name, String tagName, Namespace ns) {
super(tagName, ns);
createDocument();
--- 204,208 ----
}
! public NamedObjectBuilder(final String name, final String tagName, final Namespace ns) throws NeuClearException {
super(tagName, ns);
createDocument();
***************
*** 204,208 ****
}
! public NamedObjectBuilder(String name, String tagName) {
super(tagName, NSTools.NS_NEUID);
createDocument();
--- 210,214 ----
}
! public NamedObjectBuilder(final String name, final String tagName) throws NeuClearException {
super(tagName, NSTools.NS_NEUID);
createDocument();
***************
*** 210,214 ****
}
! public NamedObjectBuilder(String name, QName qname) {
super(qname);
createDocument();
--- 216,220 ----
}
! public NamedObjectBuilder(final String name, final QName qname) throws NeuClearException {
super(qname);
createDocument();
***************
*** 216,224 ****
}
! public NamedObjectBuilder(Element elem) throws XMLSecurityException {
super(elem);
//TODO Load targets
}
public String getTagName() {
if (getElement() == null)
--- 222,235 ----
}
! public NamedObjectBuilder(final Element elem) throws XMLSecurityException {
super(elem);
//TODO Load targets
}
+
+ public NamedObjectBuilder(final Document doc) throws XMLSecurityException {
+ super(doc.getRootElement());
+ }
+
public String getTagName() {
if (getElement() == null)
***************
*** 227,235 ****
}
! public NamedObjectBuilder(Document doc) throws XMLSecurityException {
! super(doc.getRootElement());
! }
!
! final public SignedNamedObject sign(Signer signer) throws NeuClearException, XMLException {
sign(getParent().getName(), signer);
return VerifyingReader.getInstance().read(getElement());
--- 238,242 ----
}
! final public SignedNamedObject sign(final Signer signer) throws NeuClearException, XMLException {
sign(getParent().getName(), signer);
return VerifyingReader.getInstance().read(getElement());
***************
*** 241,245 ****
* @return String containing the fully qualified URI of an object
*/
! public String getName() {
return getElement().attributeValue(getNameAttrQName());
}
--- 248,252 ----
* @return String containing the fully qualified URI of an object
*/
! public final String getName() {
return getElement().attributeValue(getNameAttrQName());
}
***************
*** 250,261 ****
* @return Parent Name
*/
! public String getLocalName() {
! String fullName = getName();
! int i = fullName.lastIndexOf('/');
return fullName.substring(i + 1);
}
! private void setName(String name) {
! getElement().addAttribute(getNameAttrQName(), name);
}
--- 257,268 ----
* @return Parent Name
*/
! public final String getLocalName() {
! final String fullName = getName();
! final int i = fullName.lastIndexOf('/');
return fullName.substring(i + 1);
}
! private void setName(final String name) throws NeuClearException {
! getElement().addAttribute(getNameAttrQName(), NSTools.normalizeNameURI(name));
}
***************
*** 266,272 ****
private void createDocument() {
! Element elem = getElement();
if (elem.getDocument() == null) {
! Document doc = DocumentHelper.createDocument(elem);
}
}
--- 273,279 ----
private void createDocument() {
! final Element elem = getElement();
if (elem.getDocument() == null) {
! final Document doc = DocumentHelper.createDocument(elem);
}
}
***************
*** 282,290 ****
* @return the XML NameSpace object
*/
! public Namespace getNS() {
return NSTools.NS_NEUID;
}
! protected void addElement(NamedObjectBuilder child) throws XMLException {
addElement((AbstractElementProxy) child);
}
--- 289,297 ----
* @return the XML NameSpace object
*/
! public final Namespace getNS() {
return NSTools.NS_NEUID;
}
! protected final void addElement(final NamedObjectBuilder child) throws XMLException {
addElement((AbstractElementProxy) child);
}
***************
*** 306,313 ****
* @param target object
*/
! public void addTarget(TargetReference target) throws NeuClearException {
if (target == null)
return;
! QName targetsQN = DocumentHelper.createQName("Targets", NSTools.NS_NEUID);
Element targetsElem = getElement().element(targetsQN);
if (targetsElem == null) {
--- 313,320 ----
* @param target object
*/
! public final void addTarget(final TargetReference target) throws NeuClearException {
if (target == null)
return;
! final QName targetsQN = DocumentHelper.createQName("Targets", NSTools.NS_NEUID);
Element targetsElem = getElement().element(targetsQN);
if (targetsElem == null) {
***************
*** 330,334 ****
* @return Iterator of targets
*/
! public Iterator listTargets() throws NeuClearException {
return targetList().iterator();
}
--- 337,341 ----
* @return Iterator of targets
*/
! public final Iterator listTargets() throws NeuClearException {
return targetList().iterator();
}
***************
*** 337,347 ****
* Sends copy of object to all targets within
*/
! public void sendObject() throws NeuClearException {
System.out.println("NEUDIST: Sending Object " + getName());
if (this.isSigned()) {
! Iterator iter = listTargets();
while (iter.hasNext()) {
! TargetReference tg = ((TargetReference) iter.next());
System.out.println("NEUDIST: Sent to " + tg.getHref());
}
--- 344,354 ----
* Sends copy of object to all targets within
*/
! public final void sendObject() throws NeuClearException {
System.out.println("NEUDIST: Sending Object " + getName());
if (this.isSigned()) {
! final Iterator iter = listTargets();
while (iter.hasNext()) {
! final TargetReference tg = ((TargetReference) iter.next());
System.out.println("NEUDIST: Sent to " + tg.getHref());
}
***************
*** 351,356 ****
}
! public Timestamp getTimeStamp() throws NeuClearException {
! String timeString = getElement().attributeValue(DocumentHelper.createQName("timestamp", NSTools.NS_NEUID));
if (isSigned() && !Utility.isEmpty(timeString)) {
try {
--- 358,363 ----
}
! public final Timestamp getTimeStamp() throws NeuClearException {
! final String timeString = getElement().attributeValue(DocumentHelper.createQName("timestamp", NSTools.NS_NEUID));
if (isSigned() && !Utility.isEmpty(timeString)) {
try {
***************
*** 367,371 ****
! public Identity getParent() throws NeuClearException {
return NSResolver.resolveIdentity(NSTools.getParentNSURI(getName()));
}
--- 374,378 ----
! public final Identity getParent() throws NeuClearException {
return NSResolver.resolveIdentity(NSTools.getParentNSURI(getName()));
}
Index: SignatureRequestBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/SignatureRequestBuilder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SignatureRequestBuilder.java 11 Nov 2003 21:18:42 -0000 1.2
--- SignatureRequestBuilder.java 21 Nov 2003 04:45:10 -0000 1.3
***************
*** 6,9 ****
--- 6,10 ----
import org.neuclear.id.SignatureRequest;
import org.neuclear.commons.Utility;
+ import org.neuclear.commons.NeuClearException;
/*
***************
*** 27,30 ****
--- 28,37 ----
$Id$
$Log$
+ Revision 1.3 2003/11/21 04:45:10 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.2 2003/11/11 21:18:42 pelle
Further vital reshuffling.
***************
*** 44,51 ****
* Time: 12:45:14 PM
*/
! public class SignatureRequestBuilder extends NamedObjectBuilder {
! public SignatureRequestBuilder(String requestor, String userid, NamedObjectBuilder unsigned, String description) {
super(NSTools.createUniqueNamedID(requestor, userid), SignatureRequest.SIGREQUEST_TAG);
! Element unsignedElem = getElement().addElement(DocumentHelper.createQName("Unsigned", NSTools.NS_NEUID));
unsignedElem.add(unsigned.getElement());
getElement().addAttribute(DocumentHelper.createQName("userid", NSTools.NS_NEUID), userid);
--- 51,58 ----
* Time: 12:45:14 PM
*/
! public final class SignatureRequestBuilder extends NamedObjectBuilder {
! public SignatureRequestBuilder(final String requestor, final String userid, final NamedObjectBuilder unsigned, final String description) throws NeuClearException {
super(NSTools.createUniqueNamedID(requestor, userid), SignatureRequest.SIGREQUEST_TAG);
! final Element unsignedElem = getElement().addElement(DocumentHelper.createQName("Unsigned", NSTools.NS_NEUID));
unsignedElem.add(unsigned.getElement());
getElement().addAttribute(DocumentHelper.createQName("userid", NSTools.NS_NEUID), userid);
***************
*** 55,59 ****
}
! public String getTagName() {
return SignatureRequest.SIGREQUEST_TAG;
}
--- 62,66 ----
}
! public final String getTagName() {
return SignatureRequest.SIGREQUEST_TAG;
}
Index: TargetReference.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/TargetReference.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TargetReference.java 19 Nov 2003 23:33:59 -0000 1.5
--- TargetReference.java 21 Nov 2003 04:45:10 -0000 1.6
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.6 2003/11/21 04:45:10 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.5 2003/11/19 23:33:59 pelle
* Signers now can generatekeys via the generateKey() method.
***************
*** 72,77 ****
import org.neuclear.xml.AbstractElementProxy;
! public class TargetReference extends AbstractElementProxy {
! public TargetReference(NamedObjectBuilder obj, Element elem) throws NeuClearException {
super(elem);
if (!elem.getName().equals(TAG_NAME))
--- 78,83 ----
import org.neuclear.xml.AbstractElementProxy;
! public final class TargetReference extends AbstractElementProxy {
! public TargetReference(final NamedObjectBuilder obj, final Element elem) throws NeuClearException {
super(elem);
if (!elem.getName().equals(TAG_NAME))
***************
*** 80,84 ****
}
! public TargetReference(NamedObjectBuilder obj, String href, String type) {
super(DocumentHelper.createQName(TAG_NAME, NSTools.NS_NEUID));
if (!Utility.isEmpty(href))
--- 86,90 ----
}
! public TargetReference(final NamedObjectBuilder obj, final String href, final String type) {
super(DocumentHelper.createQName(TAG_NAME, NSTools.NS_NEUID));
if (!Utility.isEmpty(href))
***************
*** 89,97 ****
}
! public String getHref() {
return getElement().attributeValue(DocumentHelper.createQName("href", NSTools.NS_NEUID));
}
! public String getType() {
return getElement().attributeValue(DocumentHelper.createQName("type", NSTools.NS_NEUID));
}
--- 95,103 ----
}
! public final String getHref() {
return getElement().attributeValue(DocumentHelper.createQName("href", NSTools.NS_NEUID));
}
! public final String getType() {
return getElement().attributeValue(DocumentHelper.createQName("type", NSTools.NS_NEUID));
}
***************
*** 99,107 ****
private static final String TAG_NAME = "Target";
! public String getTagName() {
return TAG_NAME;
}
! public Namespace getNS() {
return NSTools.NS_NEUID;
}
--- 105,113 ----
private static final String TAG_NAME = "Target";
! public final String getTagName() {
return TAG_NAME;
}
! public final Namespace getNS() {
return NSTools.NS_NEUID;
}
|
|
From: <pe...@us...> - 2003-11-21 04:45:26
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/jce
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/test/org/neuclear/id/jce
Modified Files:
NeuClearJCETest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: NeuClearJCETest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/jce/NeuClearJCETest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** NeuClearJCETest.java 20 Nov 2003 23:42:24 -0000 1.4
--- NeuClearJCETest.java 21 Nov 2003 04:45:17 -0000 1.5
***************
*** 36,39 ****
--- 36,45 ----
$Id$
$Log$
+ Revision 1.5 2003/11/21 04:45:17 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.4 2003/11/20 23:42:24 pelle
Getting all the tests to work in id
***************
*** 65,70 ****
* Time: 11:50:58 AM
*/
! public class NeuClearJCETest extends AbstractSigningTest {
! public NeuClearJCETest(String string) throws NeuClearException, GeneralSecurityException {
super(string);
if (Security.getProvider("NeuClear") == null) {
--- 71,76 ----
* Time: 11:50:58 AM
*/
! public final class NeuClearJCETest extends AbstractSigningTest {
! public NeuClearJCETest(final String string) throws NeuClearException, GeneralSecurityException {
super(string);
if (Security.getProvider("NeuClear") == null) {
***************
*** 74,107 ****
}
! public void testProvider() {
assertNotNull(Security.getProvider("NeuClear"));
}
! public void testCertificateFactory() throws CertificateException {
assertNotNull(CertificateFactory.getInstance("NeuClear"));
}
! public void testGetCertificate() throws NeuClearException, XMLException {
! IdentityBuilder id = new IdentityBuilder("neu://bob@test", signer.getPublicKey("neu://bob@test"));
! Identity bob = (Identity) id.sign(signer);
! Certificate cert = bob.getCertificate();
assertNotNull(cert);
assertEquals(cert.getPublicKey(), bob.getPublicKey());
}
! public void testStoreKey() throws NeuClearException, XMLException, NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException, IOException, CertificateException {
! KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", "BC");
! KeyStore ks = KeyStore.getInstance("jks", "SUN");
ks.load(null, null);
kpg.initialize(512);
! KeyPair kp = kpg.generateKeyPair();
! JCESigner sig2 = new JCESigner(ks, new AlwaysTheSamePassphraseAgent("neuclear"));
! IdentityBuilder id = new IdentityBuilder("neu://eve@test", kp.getPublic());
! Identity eve = (Identity) id.sign(signer);
ks.setKeyEntry("neu://eve@test", kp.getPrivate(), "neuclear".toCharArray(), eve.getCertificateChain());
! AuthenticationTicketBuilder authb = new AuthenticationTicketBuilder("neu://eve@test", "neu://test", "http://users.neuclear.org:8080");
//authb.sign(sig2);
--- 80,113 ----
}
! public final void testProvider() {
assertNotNull(Security.getProvider("NeuClear"));
}
! public final void testCertificateFactory() throws CertificateException {
assertNotNull(CertificateFactory.getInstance("NeuClear"));
}
! public final void testGetCertificate() throws NeuClearException, XMLException {
! final IdentityBuilder id = new IdentityBuilder("neu://bob@test", signer.getPublicKey("neu://bob@test"));
! final Identity bob = (Identity) id.sign(signer);
! final Certificate cert = bob.getCertificate();
assertNotNull(cert);
assertEquals(cert.getPublicKey(), bob.getPublicKey());
}
! public final void testStoreKey() throws NeuClearException, XMLException, NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException, IOException, CertificateException {
! final KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", "BC");
! final KeyStore ks = KeyStore.getInstance("jks", "SUN");
ks.load(null, null);
kpg.initialize(512);
! final KeyPair kp = kpg.generateKeyPair();
! final JCESigner sig2 = new JCESigner(ks, new AlwaysTheSamePassphraseAgent("neuclear"));
! final IdentityBuilder id = new IdentityBuilder("neu://eve@test", kp.getPublic());
! final Identity eve = (Identity) id.sign(signer);
ks.setKeyEntry("neu://eve@test", kp.getPrivate(), "neuclear".toCharArray(), eve.getCertificateChain());
! final AuthenticationTicketBuilder authb = new AuthenticationTicketBuilder("neu://eve@test", "neu://test", "http://users.neuclear.org:8080");
//authb.sign(sig2);
|
|
From: <pe...@us...> - 2003-11-21 04:45:26
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/tests
Modified Files:
AbstractReceiverTest.java AbstractSigningTest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AbstractReceiverTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/tests/AbstractReceiverTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AbstractReceiverTest.java 15 Nov 2003 01:58:18 -0000 1.4
--- AbstractReceiverTest.java 21 Nov 2003 04:45:16 -0000 1.5
***************
*** 32,35 ****
--- 32,41 ----
$Id$
$Log$
+ Revision 1.5 2003/11/21 04:45:16 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.4 2003/11/15 01:58:18 pelle
More work all around on web applications.
***************
*** 65,69 ****
public abstract class AbstractReceiverTest extends AbstractSigningTest {
! protected AbstractReceiverTest(String string) throws GeneralSecurityException, NeuClearException {
super(string);
CryptoTools.ensureProvider();
--- 71,75 ----
public abstract class AbstractReceiverTest extends AbstractSigningTest {
! protected AbstractReceiverTest(final String string) throws GeneralSecurityException, NeuClearException {
super(string);
CryptoTools.ensureProvider();
***************
*** 107,133 ****
! public void runDirectoryTest(String path) throws Exception, IOException, FileNotFoundException, NeuClearException, XMLException {
! File dir = new File(path);
if (!dir.exists()) {
System.out.println("Doesnt exist");
return;
}
! FilenameFilter filter;
filter = new FilenameFilter() {
! public boolean accept(File dirf, String name) {
return name.endsWith(getExtension());
}
};
! File xmlfiles[] = dir.listFiles(filter);
System.out.println("There are " + xmlfiles.length + " files in the directory");
for (int i = 0; i < xmlfiles.length; i++) {
! File xmlfile = xmlfiles[i];
System.out.print("Testing file: " + xmlfile.getName() + "... ");
try {
! SignedNamedObject obj = reader.read(new FileInputStream(xmlfile));
System.out.println("Receiving name : " + obj.getName());
! Object prestate = getPreTransactionState(obj);
getReceiver().receive(obj);
assertTrue(verifyTransaction(obj, prestate));
--- 113,139 ----
! public final void runDirectoryTest(final String path) throws Exception, IOException, FileNotFoundException, NeuClearException, XMLException {
! final File dir = new File(path);
if (!dir.exists()) {
System.out.println("Doesnt exist");
return;
}
! final FilenameFilter filter;
filter = new FilenameFilter() {
! public boolean accept(final File dirf, final String name) {
return name.endsWith(getExtension());
}
};
! final File[] xmlfiles = dir.listFiles(filter);
System.out.println("There are " + xmlfiles.length + " files in the directory");
for (int i = 0; i < xmlfiles.length; i++) {
! final File xmlfile = xmlfiles[i];
System.out.print("Testing file: " + xmlfile.getName() + "... ");
try {
! final SignedNamedObject obj = reader.read(new FileInputStream(xmlfile));
System.out.println("Receiving name : " + obj.getName());
! final Object prestate = getPreTransactionState(obj);
getReceiver().receive(obj);
assertTrue(verifyTransaction(obj, prestate));
Index: AbstractSigningTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/tests/AbstractSigningTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AbstractSigningTest.java 18 Nov 2003 15:07:36 -0000 1.2
--- AbstractSigningTest.java 21 Nov 2003 04:45:16 -0000 1.3
***************
*** 31,34 ****
--- 31,40 ----
$Id$
$Log$
+ Revision 1.3 2003/11/21 04:45:16 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.2 2003/11/18 15:07:36 pelle
Changes to JCE Implementation
***************
*** 47,51 ****
*/
public class AbstractSigningTest extends TestCase {
! public AbstractSigningTest(String string) throws NeuClearException, GeneralSecurityException {
super(string);
CryptoTools.ensureProvider();
--- 53,57 ----
*/
public class AbstractSigningTest extends TestCase {
! public AbstractSigningTest(final String string) throws NeuClearException, GeneralSecurityException {
super(string);
CryptoTools.ensureProvider();
***************
*** 61,65 ****
*/
! protected Identity getBob() {
return bob;
}
--- 67,71 ----
*/
! protected final Identity getBob() {
return bob;
}
***************
*** 71,75 ****
*/
! protected Identity getAlice() {
return alice;
}
--- 77,81 ----
*/
! protected final Identity getAlice() {
return alice;
}
|
|
From: <pe...@us...> - 2003-11-21 04:45:26
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/test/org/neuclear/id
Modified Files:
NSToolsTest.java NameSpaceTest.java SignedNamedCoreTest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: NSToolsTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NSToolsTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** NSToolsTest.java 11 Nov 2003 21:18:46 -0000 1.10
--- NSToolsTest.java 21 Nov 2003 04:45:17 -0000 1.11
***************
*** 2,5 ****
--- 2,11 ----
$Id$
$Log$
+ Revision 1.11 2003/11/21 04:45:17 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.10 2003/11/11 21:18:46 pelle
Further vital reshuffling.
***************
*** 106,124 ****
* @author Pelle Braendgaard
*/
! public class NSToolsTest extends TestCase {
! public NSToolsTest(String name) {
super(name);
}
! private static void assertValidName(String name) throws NeuClearException {
assertTrue("Should be valid='" + name + "'", NSTools.isValidName(name));
}
! private static void assertInvalidName(String name) throws NeuClearException {
assertTrue("Should be invalid='" + name + "'", !NSTools.isValidName(name));
}
! public void testValidName() throws NeuClearException {
assertValidName("/");
assertValidName("neu://");
--- 112,130 ----
* @author Pelle Braendgaard
*/
! public final class NSToolsTest extends TestCase {
! public NSToolsTest(final String name) {
super(name);
}
! private static void assertValidName(final String name) throws NeuClearException {
assertTrue("Should be valid='" + name + "'", NSTools.isValidName(name));
}
! private static void assertInvalidName(final String name) throws NeuClearException {
assertTrue("Should be invalid='" + name + "'", !NSTools.isValidName(name));
}
! public final void testValidName() throws NeuClearException {
assertValidName("/");
assertValidName("neu://");
Index: NameSpaceTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NameSpaceTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** NameSpaceTest.java 18 Nov 2003 15:07:37 -0000 1.8
--- NameSpaceTest.java 21 Nov 2003 04:45:17 -0000 1.9
***************
*** 2,5 ****
--- 2,11 ----
$Id$
$Log$
+ Revision 1.9 2003/11/21 04:45:17 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.8 2003/11/18 15:07:37 pelle
Changes to JCE Implementation
***************
*** 156,162 ****
* @author Pelle Braendgaard
*/
! public class NameSpaceTest extends TestCase {
! public NameSpaceTest(String string) {
super(string);
CryptoTools.ensureProvider();
--- 162,168 ----
* @author Pelle Braendgaard
*/
! public final class NameSpaceTest extends TestCase {
! public NameSpaceTest(final String string) {
super(string);
CryptoTools.ensureProvider();
***************
*** 184,188 ****
* </ul>
*/
! protected void setUp() throws FileNotFoundException, GeneralSecurityException, IOException {
/*
--- 190,194 ----
* </ul>
*/
! protected final void setUp() throws FileNotFoundException, GeneralSecurityException, IOException {
/*
***************
*** 223,227 ****
! public void testGetRoot() {
assertNotNull(Identity.NEUROOT);
}
--- 229,233 ----
! public final void testGetRoot() {
assertNotNull(Identity.NEUROOT);
}
Index: SignedNamedCoreTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/SignedNamedCoreTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SignedNamedCoreTest.java 20 Nov 2003 23:42:24 -0000 1.1
--- SignedNamedCoreTest.java 21 Nov 2003 04:45:17 -0000 1.2
***************
*** 6,9 ****
--- 6,10 ----
import org.neuclear.commons.crypto.signers.DefaultSigner;
import org.neuclear.commons.crypto.signers.JCESigner;
+ import org.neuclear.commons.crypto.signers.TestCaseSigner;
import org.neuclear.id.builders.AuthenticationTicketBuilder;
import org.neuclear.id.builders.NamedObjectBuilder;
***************
*** 33,36 ****
--- 34,43 ----
$Id$
$Log$
+ Revision 1.2 2003/11/21 04:45:17 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.1 2003/11/20 23:42:24 pelle
Getting all the tests to work in id
***************
*** 46,53 ****
* Time: 5:26:22 PM
*/
! public class SignedNamedCoreTest extends TestCase {
! public void testCreateRoot() {
! SignedNamedCore core = SignedNamedCore.createRootCore();
assertNotNull(core);
assertEquals(core.getName(), "neu://");
--- 53,60 ----
* Time: 5:26:22 PM
*/
! public final class SignedNamedCoreTest extends TestCase {
! public final void testCreateRoot() {
! final SignedNamedCore core = SignedNamedCore.createRootCore();
assertNotNull(core);
assertEquals(core.getName(), "neu://");
***************
*** 55,62 ****
}
! public void testRead() throws NeuClearException, GeneralSecurityException, XMLException, FileNotFoundException {
! final String name = "neu://";
! NamedObjectBuilder builder = new AuthenticationTicketBuilder(name, "neu://test", "http://slashdot.org");
! final JCESigner signer = new DefaultSigner(new GuiDialogAgent());
builder.sign(name, signer);
assertTrue(builder.verifySignature(signer.getPublicKey(name)));
--- 62,69 ----
}
! public final void testRead() throws NeuClearException, GeneralSecurityException, XMLException, FileNotFoundException {
! final String name = "neu://bob@test";
! final NamedObjectBuilder builder = new AuthenticationTicketBuilder(name, "neu://test", "http://slashdot.org");
! final JCESigner signer = new TestCaseSigner();
builder.sign(name, signer);
assertTrue(builder.verifySignature(signer.getPublicKey(name)));
***************
*** 64,68 ****
assertTrue(builder.verifySignature(Identity.NEUROOT.getPublicKey()));
try {
! SignedNamedCore core = SignedNamedCore.read(builder.getElement());
assertEquals(core.getSignatory().getName(), name);
} catch (InvalidNamedObject e) {
--- 71,75 ----
assertTrue(builder.verifySignature(Identity.NEUROOT.getPublicKey()));
try {
! final SignedNamedCore core = SignedNamedCore.read(builder.getElement());
assertEquals(core.getSignatory().getName(), name);
} catch (InvalidNamedObject e) {
|
|
From: <pe...@us...> - 2003-11-21 04:45:26
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/java/org/neuclear/store Modified Files: EncryptedFileStore.java FileStore.java Store.java StoreFactory.java Log Message: EncryptedFileStore now works. It uses the PBECipher with DES3 afair. Otherwise You will Finaliate. Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final. This should hopefully make everything more stable (and secure). Index: EncryptedFileStore.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/EncryptedFileStore.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** EncryptedFileStore.java 19 Nov 2003 23:34:00 -0000 1.13 --- EncryptedFileStore.java 21 Nov 2003 04:45:14 -0000 1.14 *************** *** 2,5 **** --- 2,11 ---- * $Id$ * $Log$ + * Revision 1.14 2003/11/21 04:45:14 pelle + * EncryptedFileStore now works. It uses the PBECipher with DES3 afair. + * Otherwise You will Finaliate. + * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final. + * This should hopefully make everything more stable (and secure). + * * Revision 1.13 2003/11/19 23:34:00 pelle * Signers now can generatekeys via the generateKey() method. *************** *** 175,178 **** --- 181,185 ---- import org.neuclear.commons.NeuClearException; import org.neuclear.commons.crypto.CryptoTools; + import org.neuclear.commons.crypto.CryptoException; import org.neuclear.id.NSTools; import org.neuclear.id.SignedNamedObject; *************** *** 180,183 **** --- 187,191 ---- import javax.crypto.CipherInputStream; import javax.crypto.CipherOutputStream; + import javax.crypto.Cipher; import java.io.*; *************** *** 186,219 **** * This EncryptedFileStore stores the objects en encrypted format in a file name based on its path */ ! public class EncryptedFileStore extends FileStore { ! public EncryptedFileStore(String base) { super(base); } ! protected OutputStream getOutputStream(SignedNamedObject obj) throws NeuClearException, FileNotFoundException { ! String outputFilename = base + getFileName(obj); System.out.println("Outputting to: " + outputFilename); ! File outputFile = new File(outputFilename); outputFile.getParentFile().mkdirs(); ! return new CipherOutputStream(new FileOutputStream(outputFile), CryptoTools.getCipher(CryptoTools.digest256(obj.getName().getBytes()), true)); } ! protected InputStream getInputStream(String name) throws FileNotFoundException, NeuClearException { ! String inputFilename = base + getFileName(name); System.out.println("Loading from: " + inputFilename); ! File fin = new File(inputFilename); if (!fin.exists()) throw new NeuClearException("NeuClear: " + name + " doesnt exist"); ! return new CipherInputStream(new FileInputStream(fin), CryptoTools.getCipher(CryptoTools.digest256(name.getBytes()), false)); } ! protected String getFileName(String name) throws NeuClearException { ! String deURLizedName = NSTools.normalizeNameURI(name); ! byte hash[] = CryptoTools.formatAsURLSafe(CryptoTools.digest512(deURLizedName.getBytes())).getBytes(); //if (true) return new String(hash); ! int partlength = hash.length / 8; ! byte newName[] = new byte[hash.length + 8]; for (int i = 0; i < 8; i++) { newName[i * (partlength + 1)] = (byte) '/'; --- 194,235 ---- * This EncryptedFileStore stores the objects en encrypted format in a file name based on its path */ ! public final class EncryptedFileStore extends FileStore { ! public EncryptedFileStore(final String base) { super(base); } ! protected final OutputStream getOutputStream(final SignedNamedObject obj) throws NeuClearException, FileNotFoundException { ! final String outputFilename = base + getFileName(obj); System.out.println("Outputting to: " + outputFilename); ! final File outputFile = new File(outputFilename); outputFile.getParentFile().mkdirs(); ! try { ! return new CipherOutputStream(new FileOutputStream(outputFile), CryptoTools.makePBECipher(Cipher.ENCRYPT_MODE,obj.getName().toCharArray())); ! } catch (Exception e) { ! throw new CryptoException(e); ! } } ! protected final InputStream getInputStream(final String name) throws FileNotFoundException, NeuClearException { ! final String inputFilename = base + getFileName(name); System.out.println("Loading from: " + inputFilename); ! final File fin = new File(inputFilename); if (!fin.exists()) throw new NeuClearException("NeuClear: " + name + " doesnt exist"); ! try { ! return new CipherInputStream(new FileInputStream(fin), CryptoTools.makePBECipher(Cipher.DECRYPT_MODE,name.toCharArray())); ! } catch (Exception e) { ! throw new CryptoException(e); ! } } ! protected final String getFileName(final String name) throws NeuClearException { ! final String deURLizedName = NSTools.normalizeNameURI(name); ! final byte[] hash = CryptoTools.formatAsURLSafe(CryptoTools.digest256(deURLizedName.getBytes())).getBytes(); //if (true) return new String(hash); ! final int partlength = hash.length / 8; ! final byte[] newName = new byte[hash.length + 8]; for (int i = 0; i < 8; i++) { newName[i * (partlength + 1)] = (byte) '/'; Index: FileStore.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/FileStore.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** FileStore.java 19 Nov 2003 23:34:00 -0000 1.14 --- FileStore.java 21 Nov 2003 04:45:16 -0000 1.15 *************** *** 2,5 **** --- 2,11 ---- * $Id$ * $Log$ + * Revision 1.15 2003/11/21 04:45:16 pelle + * EncryptedFileStore now works. It uses the PBECipher with DES3 afair. + * Otherwise You will Finaliate. + * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final. + * This should hopefully make everything more stable (and secure). + * * Revision 1.14 2003/11/19 23:34:00 pelle * Signers now can generatekeys via the generateKey() method. *************** *** 179,198 **** */ public class FileStore extends Store { ! public FileStore(String base) { this.base = base; } ! protected void rawStore(SignedNamedObject obj) throws IOException, NeuClearException, XMLException { ! OutputStream out = getOutputStream(obj); out.write(obj.getEncoded().getBytes("UTF-8")); out.close(); } ! protected OutputStream getOutputStream(SignedNamedObject obj) throws NeuClearException, FileNotFoundException { ! String outputFilename = base + getFileName(obj); System.out.println("Outputting to: " + outputFilename); ! File outputFile = new File(outputFilename); outputFile.getParentFile().mkdirs(); ! OutputStream out = new FileOutputStream(outputFile); return out; } --- 185,204 ---- */ public class FileStore extends Store { ! public FileStore(final String base) { this.base = base; } ! protected final void rawStore(final SignedNamedObject obj) throws IOException, NeuClearException, XMLException { ! final OutputStream out = getOutputStream(obj); out.write(obj.getEncoded().getBytes("UTF-8")); out.close(); } ! protected OutputStream getOutputStream(final SignedNamedObject obj) throws NeuClearException, FileNotFoundException { ! final String outputFilename = base + getFileName(obj); System.out.println("Outputting to: " + outputFilename); ! final File outputFile = new File(outputFilename); outputFile.getParentFile().mkdirs(); ! final OutputStream out = new FileOutputStream(outputFile); return out; } *************** *** 202,206 **** // } ! SignedNamedObject fetch(String name) throws NeuClearException { try { --- 208,212 ---- // } ! final SignedNamedObject fetch(final String name) throws NeuClearException { try { *************** *** 214,221 **** } ! protected InputStream getInputStream(String name) throws FileNotFoundException, NeuClearException { ! String inputFilename = base + getFileName(name); System.out.println("Loading from: " + inputFilename); ! File fin = new File(inputFilename); if (!fin.exists()) throw new NeuClearException("NeuClear: " + name + " doesnt exist"); --- 220,227 ---- } ! protected InputStream getInputStream(final String name) throws FileNotFoundException, NeuClearException { ! final String inputFilename = base + getFileName(name); System.out.println("Loading from: " + inputFilename); ! final File fin = new File(inputFilename); if (!fin.exists()) throw new NeuClearException("NeuClear: " + name + " doesnt exist"); *************** *** 225,233 **** ! protected String getFileName(String name) throws NeuClearException { return NSTools.url2path(name) + "/root.id"; } ! protected String getFileName(SignedNamedObject obj) throws NeuClearException { return getFileName(obj.getName()); // if (! (obj instanceof Identity)) --- 231,239 ---- ! protected String getFileName(final String name) throws NeuClearException { return NSTools.url2path(name) + "/root.id"; } ! protected final String getFileName(final SignedNamedObject obj) throws NeuClearException { 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.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Store.java 19 Nov 2003 23:34:00 -0000 1.14 --- Store.java 21 Nov 2003 04:45:16 -0000 1.15 *************** *** 2,5 **** --- 2,11 ---- * $Id$ * $Log$ + * Revision 1.15 2003/11/21 04:45:16 pelle + * EncryptedFileStore now works. It uses the PBECipher with DES3 afair. + * Otherwise You will Finaliate. + * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final. + * This should hopefully make everything more stable (and secure). + * * Revision 1.14 2003/11/19 23:34:00 pelle * Signers now can generatekeys via the generateKey() method. *************** *** 188,192 **** * This handles the Identity checking on the object. */ ! public final org.neuclear.xml.ElementProxy receive(SignedNamedObject obj) throws NeuClearException { try { rawStore(obj); --- 194,198 ---- * This handles the Identity checking on the object. */ ! public final org.neuclear.xml.ElementProxy receive(final SignedNamedObject obj) throws NeuClearException { try { rawStore(obj); *************** *** 202,206 **** * Override this for each specific Store type */ ! protected void rawStore(SignedNamedObject obj) throws IOException, NeuClearException, XMLException { ; } --- 208,212 ---- * Override this for each specific Store type */ ! protected void rawStore(final SignedNamedObject obj) throws IOException, NeuClearException, XMLException { ; } Index: StoreFactory.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/StoreFactory.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StoreFactory.java 11 Nov 2003 21:18:44 -0000 1.3 --- StoreFactory.java 21 Nov 2003 04:45:16 -0000 1.4 *************** *** 2,5 **** --- 2,11 ---- * $Id$ * $Log$ + * Revision 1.4 2003/11/21 04:45:16 pelle + * EncryptedFileStore now works. It uses the PBECipher with DES3 afair. + * Otherwise You will Finaliate. + * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final. + * This should hopefully make everything more stable (and secure). + * * Revision 1.3 2003/11/11 21:18:44 pelle * Further vital reshuffling. *************** *** 69,78 **** ! public class StoreFactory { private StoreFactory() { } ! public synchronized Store getStoreInstance(String path) { // synchronized (store) { if (store==null) --- 75,84 ---- ! public final class StoreFactory { private StoreFactory() { } ! public final synchronized Store getStoreInstance(final String path) { // synchronized (store) { if (store==null) |
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/test/org/neuclear/id/builders
Modified Files:
AuthenticationBuilderTest.java IdentityBuilderTest.java
SigningRequestBuilderTest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AuthenticationBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/AuthenticationBuilderTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AuthenticationBuilderTest.java 19 Nov 2003 23:34:00 -0000 1.2
--- AuthenticationBuilderTest.java 21 Nov 2003 04:45:16 -0000 1.3
***************
*** 29,32 ****
--- 29,38 ----
$Id$
$Log$
+ Revision 1.3 2003/11/21 04:45:16 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.2 2003/11/19 23:34:00 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 49,62 ****
* Time: 3:28:05 PM
*/
! public class AuthenticationBuilderTest extends AbstractSigningTest {
! public AuthenticationBuilderTest(String string) throws NeuClearException, GeneralSecurityException {
super(string);
}
! public void testAuthenticate() throws NeuClearException, XMLException {
! AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder("neu://bob@test", "neu://test", "http://users.neuclear.org:8080");
assertEquals(authreq.getParent().getName(), "neu://bob@test");
try {
! AuthenticationTicket auth = (AuthenticationTicket) authreq.sign(signer);
assertTrue(authreq.isSigned());
assertEquals(auth.getName(), authreq.getName());
--- 55,68 ----
* Time: 3:28:05 PM
*/
! public final class AuthenticationBuilderTest extends AbstractSigningTest {
! public AuthenticationBuilderTest(final String string) throws NeuClearException, GeneralSecurityException {
super(string);
}
! public final void testAuthenticate() throws NeuClearException, XMLException {
! final AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder("neu://bob@test", "neu://test", "http://users.neuclear.org:8080");
assertEquals(authreq.getParent().getName(), "neu://bob@test");
try {
! final AuthenticationTicket auth = (AuthenticationTicket) authreq.sign(signer);
assertTrue(authreq.isSigned());
assertEquals(auth.getName(), authreq.getName());
Index: IdentityBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/IdentityBuilderTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** IdentityBuilderTest.java 19 Nov 2003 23:34:00 -0000 1.6
--- IdentityBuilderTest.java 21 Nov 2003 04:45:17 -0000 1.7
***************
*** 35,38 ****
--- 35,44 ----
$Id$
$Log$
+ Revision 1.7 2003/11/21 04:45:17 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.6 2003/11/19 23:34:00 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 69,81 ****
* Time: 5:33:30 PM
*/
! public class IdentityBuilderTest extends AbstractSigningTest {
! public IdentityBuilderTest(String string) throws GeneralSecurityException, NeuClearException, FileNotFoundException {
super(string);
rootsigner = new DefaultSigner(new GuiDialogAgent());
}
! public void createIdentities(String name) throws NeuClearException, XMLException {
if (getSigner().canSignFor(name)) {
! IdentityBuilder id = new IdentityBuilder(
name,
((PublicKeySource) getSigner()).getPublicKey(name),
--- 75,87 ----
* Time: 5:33:30 PM
*/
! public final class IdentityBuilderTest extends AbstractSigningTest {
! public IdentityBuilderTest(final String string) throws GeneralSecurityException, NeuClearException, FileNotFoundException {
super(string);
rootsigner = new DefaultSigner(new GuiDialogAgent());
}
! public final void createIdentities(final String name) throws NeuClearException, XMLException {
if (getSigner().canSignFor(name)) {
! final IdentityBuilder id = new IdentityBuilder(
name,
((PublicKeySource) getSigner()).getPublicKey(name),
***************
*** 86,90 ****
final String parent = NSTools.getParentNSURI(id.getName());
! SignedNamedObject sec = null;
if (getSigner().canSignFor(parent)) {
id.sign(getSigner());
--- 92,96 ----
final String parent = NSTools.getParentNSURI(id.getName());
! final SignedNamedObject sec = null;
if (getSigner().canSignFor(parent)) {
id.sign(getSigner());
***************
*** 93,97 ****
}
assertNotNull(sec);
! File file = new File(PATH + NSTools.url2path(id.getName()) + "/root.id");
file.getParentFile().mkdirs();
System.out.println("Wrote: " + file.getAbsolutePath());
--- 99,103 ----
}
assertNotNull(sec);
! final File file = new File(PATH + NSTools.url2path(id.getName()) + "/root.id");
file.getParentFile().mkdirs();
System.out.println("Wrote: " + file.getAbsolutePath());
***************
*** 105,109 ****
}
! public void testBuild() throws NeuClearException, XMLException {
// createIdentities("neu://test");
createIdentities("neu://test/bux");
--- 111,115 ----
}
! public final void testBuild() throws NeuClearException, XMLException {
// createIdentities("neu://test");
createIdentities("neu://test/bux");
Index: SigningRequestBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/SigningRequestBuilderTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SigningRequestBuilderTest.java 19 Nov 2003 23:34:00 -0000 1.2
--- SigningRequestBuilderTest.java 21 Nov 2003 04:45:17 -0000 1.3
***************
*** 30,33 ****
--- 30,39 ----
$Id$
$Log$
+ Revision 1.3 2003/11/21 04:45:17 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.2 2003/11/19 23:34:00 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 50,71 ****
* Time: 3:28:05 PM
*/
! public class SigningRequestBuilderTest extends AbstractSigningTest {
! public SigningRequestBuilderTest(String string) throws NeuClearException, GeneralSecurityException {
super(string);
}
! public void testSignatureRequest() throws NeuClearException, XMLException {
! AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder("neu://bob@test", "neu://test", "http://users.neuclear.org:8080");
! SignatureRequestBuilder sigreq = new SignatureRequestBuilder("neu://test", "neu://bob@test", authreq, "For testing purposes");
assertEquals(sigreq.getParent().getName(), "neu://test");
try {
! SignatureRequest tosign = (SignatureRequest) sigreq.sign(signer);
assertTrue(sigreq.isSigned());
assertEquals(tosign.getName(), sigreq.getName());
! NamedObjectBuilder auth2 = tosign.getUnsigned();
assertEquals(auth2.getParent().getName(), "neu://bob@test");
! AuthenticationTicket auth = (AuthenticationTicket) auth2.sign(signer);
assertTrue(auth2.isSigned());
assertEquals(auth.getName(), authreq.getName());
--- 56,77 ----
* Time: 3:28:05 PM
*/
! public final class SigningRequestBuilderTest extends AbstractSigningTest {
! public SigningRequestBuilderTest(final String string) throws NeuClearException, GeneralSecurityException {
super(string);
}
! public final void testSignatureRequest() throws NeuClearException, XMLException {
! final AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder("neu://bob@test", "neu://test", "http://users.neuclear.org:8080");
! final SignatureRequestBuilder sigreq = new SignatureRequestBuilder("neu://test", "neu://bob@test", authreq, "For testing purposes");
assertEquals(sigreq.getParent().getName(), "neu://test");
try {
! final SignatureRequest tosign = (SignatureRequest) sigreq.sign(signer);
assertTrue(sigreq.isSigned());
assertEquals(tosign.getName(), sigreq.getName());
! final NamedObjectBuilder auth2 = tosign.getUnsigned();
assertEquals(auth2.getParent().getName(), "neu://bob@test");
! final AuthenticationTicket auth = (AuthenticationTicket) auth2.sign(signer);
assertTrue(auth2.isSigned());
assertEquals(auth.getName(), authreq.getName());
|
|
From: <pe...@us...> - 2003-11-21 04:45:26
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/source
In directory sc8-pr-cvs1:/tmp/cvs-serv10855/src/test/org/neuclear/source
Modified Files:
HttpSourceTest.java SourceTest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: HttpSourceTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/source/HttpSourceTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** HttpSourceTest.java 5 Nov 2003 18:50:34 -0000 1.1
--- HttpSourceTest.java 21 Nov 2003 04:45:17 -0000 1.2
***************
*** 21,24 ****
--- 21,30 ----
$Id$
$Log$
+ Revision 1.2 2003/11/21 04:45:17 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.1 2003/11/05 18:50:34 pelle
Refactored org.neuclear.signers.source.Source and implementing classes to provide support for a local filesystem cache.
***************
*** 32,41 ****
* Time: 1:27:17 PM
*/
! public class HttpSourceTest extends SourceTest {
! public HttpSourceTest(String name) {
super(name);
}
! protected Source createSource() {
return new HttpSource();
}
--- 38,47 ----
* Time: 1:27:17 PM
*/
! public final class HttpSourceTest extends SourceTest {
! public HttpSourceTest(final String name) {
super(name);
}
! protected final Source createSource() {
return new HttpSource();
}
Index: SourceTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/source/SourceTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SourceTest.java 5 Nov 2003 18:50:34 -0000 1.1
--- SourceTest.java 21 Nov 2003 04:45:17 -0000 1.2
***************
*** 25,28 ****
--- 25,34 ----
$Id$
$Log$
+ Revision 1.2 2003/11/21 04:45:17 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.1 2003/11/05 18:50:34 pelle
Refactored org.neuclear.signers.source.Source and implementing classes to provide support for a local filesystem cache.
***************
*** 37,41 ****
*/
public class SourceTest extends TestCase {
! public SourceTest(String name) {
super(name);
source = createSource();
--- 43,47 ----
*/
public class SourceTest extends TestCase {
! public SourceTest(final String name) {
super(name);
source = createSource();
***************
*** 46,58 ****
}
! public void testFetch() throws NeuClearException {
! SignedNamedObject test = source.fetch("http://repository.neuclear.org", "neu://test");
assertNotNull(test);
assertEquals("neu://test", test.getName());
! SignedNamedObject root = source.fetch("http://repository.neuclear.org", "neu://");
assertNotNull(root);
assertEquals("neu://", root.getName());
}
! private Source source;
}
--- 52,64 ----
}
! public final void testFetch() throws NeuClearException {
! final SignedNamedObject test = source.fetch("http://repository.neuclear.org", "neu://test");
assertNotNull(test);
assertEquals("neu://test", test.getName());
! final SignedNamedObject root = source.fetch("http://repository.neuclear.org", "neu://");
assertNotNull(root);
assertEquals("neu://", root.getName());
}
! private final Source source;
}
|