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-12-11 23:57:34
|
Update of /cvsroot/neuclear/neuclear-id/src/test-cactus/org/neuclear/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv1620/src/test-cactus/org/neuclear/receiver
Modified Files:
ReceiverServletTest.java
Added Files:
MockReceiver.java
Log Message:
Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
--- NEW FILE: MockReceiver.java ---
package org.neuclear.receiver;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.xml.ElementProxy;
/*
NeuClear Distributed Transaction Clearing Platform
(C) 2003 Pelle Braendgaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: MockReceiver.java,v 1.1 2003/12/11 23:57:30 pelle Exp $
$Log: MockReceiver.java,v $
Revision 1.1 2003/12/11 23:57:30 pelle
Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
*/
/**
* User: pelleb
* Date: Dec 11, 2003
* Time: 6:03:55 PM
*/
public class MockReceiver implements Receiver {
/**
* Add your main transaction processing logic within this method.
* Remember you must check the validity of the SignedNamedObject here. Until you do so
* you can not trust it.
*
* @param obj
* @throws UnsupportedTransaction
*/
public ElementProxy receive(SignedNamedObject obj) throws UnsupportedTransaction, NeuClearException {
received = obj;
return;
}
public SignedNamedObject getLastReceived() {
return received;
}
private SignedNamedObject received = null;
}
Index: ReceiverServletTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test-cactus/org/neuclear/receiver/ReceiverServletTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ReceiverServletTest.java 28 Nov 2003 00:12:59 -0000 1.2
--- ReceiverServletTest.java 11 Dec 2003 23:57:30 -0000 1.3
***************
*** 7,16 ****
import org.neuclear.commons.crypto.signers.JCESigner;
import org.neuclear.commons.crypto.signers.TestCaseSigner;
- import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.builders.AuthenticationTicketBuilder;
- import org.neuclear.xml.ElementProxy;
import org.neuclear.xml.XMLException;
import org.neuclear.xml.xmlsec.XMLSecTools;
import java.security.GeneralSecurityException;
--- 7,16 ----
import org.neuclear.commons.crypto.signers.JCESigner;
import org.neuclear.commons.crypto.signers.TestCaseSigner;
import org.neuclear.id.builders.AuthenticationTicketBuilder;
import org.neuclear.xml.XMLException;
import org.neuclear.xml.xmlsec.XMLSecTools;
+ import javax.servlet.ServletException;
+ import java.io.IOException;
import java.security.GeneralSecurityException;
***************
*** 35,38 ****
--- 35,42 ----
$Id$
$Log$
+ Revision 1.3 2003/12/11 23:57:30 pelle
+ Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+
Revision 1.2 2003/11/28 00:12:59 pelle
Getting the NeuClear web transactions working.
***************
*** 58,78 ****
}
! public void testReceiveBase64() {
ReceiverServlet servlet = new ReceiverServlet();
! servlet.setReceiver(new Receiver() {
! /**
! * Add your main transaction processing logic within this method.
! * Remember you must check the validity of the SignedNamedObject here. Until you do so
! * you can not trust it.
! *
! * @param obj
! * @throws org.neuclear.receiver.UnsupportedTransaction
! *
! */
! public ElementProxy receive(SignedNamedObject obj) throws UnsupportedTransaction, NeuClearException {
! return null;
! }
- });
}
}
--- 62,76 ----
}
! public void testReceiveBase64() throws ServletException, IOException {
ReceiverServlet servlet = new ReceiverServlet();
! MockReceiver receiver = new MockReceiver();
! servlet.setReceiver(receiver);
! servlet.init(config);
! servlet.service(request, response);
! assertNotNull(receiver.getLastReceived());
! assertEquals(receiver.getLastReceived().getSignatory().getName(), "neu://bob@test");
}
+
+
}
|
|
From: <pe...@us...> - 2003-12-11 23:57:34
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/resolver In directory sc8-pr-cvs1:/tmp/cvs-serv1620/src/test/org/neuclear/id/resolver Modified Files: ResolverTests.java Log Message: Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort. Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed. Index: ResolverTests.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/resolver/ResolverTests.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ResolverTests.java 9 Dec 2003 23:41:44 -0000 1.2 --- ResolverTests.java 11 Dec 2003 23:57:29 -0000 1.3 *************** *** 2,6 **** import junit.framework.TestCase; - import org.neuclear.id.InvalidNamedObject; import org.neuclear.commons.NeuClearException; --- 2,5 ---- |
|
From: <pe...@us...> - 2003-12-11 23:57:33
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet
In directory sc8-pr-cvs1:/tmp/cvs-serv1620/src/java/org/neuclear/signers/servlet
Modified Files:
DemoSigningServlet.java SigningServlet.java
Log Message:
Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
Index: DemoSigningServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet/DemoSigningServlet.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** DemoSigningServlet.java 10 Dec 2003 23:58:52 -0000 1.11
--- DemoSigningServlet.java 11 Dec 2003 23:57:29 -0000 1.12
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.12 2003/12/11 23:57:29 pelle
+ * Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ * Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+ *
* Revision 1.11 2003/12/10 23:58:52 pelle
* Did some cleaning up in the builders
***************
*** 187,191 ****
// getStore().receive(id);//Test locally first
ns.sendObject();
! } catch (InvalidNamedObject e) {
System.out.println("NEUDIST: Identity Error: " + e.getLocalizedMessage());
}
--- 191,195 ----
// getStore().receive(id);//Test locally first
ns.sendObject();
! } catch (InvalidNamedObjectException e) {
System.out.println("NEUDIST: Identity Error: " + e.getLocalizedMessage());
}
Index: SigningServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet/SigningServlet.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** SigningServlet.java 10 Dec 2003 23:58:52 -0000 1.16
--- SigningServlet.java 11 Dec 2003 23:57:29 -0000 1.17
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.17 2003/12/11 23:57:29 pelle
+ * Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ * Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+ *
* Revision 1.16 2003/12/10 23:58:52 pelle
* Did some cleaning up in the builders
***************
*** 197,201 ****
import org.neuclear.commons.crypto.signers.TestCaseSigner;
import org.neuclear.commons.servlets.ServletTools;
! import org.neuclear.id.InvalidNamedObject;
import org.neuclear.id.NSTools;
import org.neuclear.id.SignatureRequest;
--- 201,205 ----
import org.neuclear.commons.crypto.signers.TestCaseSigner;
import org.neuclear.commons.servlets.ServletTools;
! import org.neuclear.id.InvalidNamedObjectException;
import org.neuclear.id.NSTools;
import org.neuclear.id.SignatureRequest;
***************
*** 287,291 ****
out.println(signed.getName() + " Verified<br>");
! } catch (InvalidNamedObject e) {
out.println("<br><font color=\"red\"><b>ERROR: Invalid Identity</b></font><br>");
//e.printStackTrace(out);
--- 291,295 ----
out.println(signed.getName() + " Verified<br>");
! } catch (InvalidNamedObjectException e) {
out.println("<br><font color=\"red\"><b>ERROR: Invalid Identity</b></font><br>");
//e.printStackTrace(out);
***************
*** 388,392 ****
signObject(obj, "hello".toCharArray());// TODO How do we get the passphrase here? Popup request?
return obj.getElement();
! } catch (InvalidNamedObject e) {
throw new SOAPException(e);
} catch (InvalidPassphraseException e) {
--- 392,396 ----
signObject(obj, "hello".toCharArray());// TODO How do we get the passphrase here? Popup request?
return obj.getElement();
! } catch (InvalidNamedObjectException e) {
throw new SOAPException(e);
} catch (InvalidPassphraseException e) {
***************
*** 399,403 ****
}
! protected static void signObject(SignedNamedObject obj, char passphrase[]) throws NeuClearException, InvalidNamedObject, InvalidPassphraseException, NonExistingSignerException {
if (!obj.isSigned()) {
try {
--- 403,407 ----
}
! protected static void signObject(SignedNamedObject obj, char passphrase[]) throws NeuClearException, InvalidNamedObjectException, InvalidPassphraseException, NonExistingSignerException {
if (!obj.isSigned()) {
try {
|
|
From: <pe...@us...> - 2003-12-11 23:57:33
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv1620/src/test/org/neuclear/id
Modified Files:
NSToolsTest.java SignedNamedCoreTest.java
Log Message:
Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
Index: NSToolsTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NSToolsTest.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** NSToolsTest.java 11 Dec 2003 16:16:14 -0000 1.15
--- NSToolsTest.java 11 Dec 2003 23:57:30 -0000 1.16
***************
*** 2,5 ****
--- 2,9 ----
$Id$
$Log$
+ Revision 1.16 2003/12/11 23:57:30 pelle
+ Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+
Revision 1.15 2003/12/11 16:16:14 pelle
Some changes to make the xml a bit more readable.
***************
*** 127,138 ****
import junit.framework.TestCase;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.CryptoTools;
- import org.neuclear.id.builders.NamedObjectBuilder;
import org.neuclear.id.builders.AuthenticationTicketBuilder;
- import org.neuclear.id.builders.SignatureRequestBuilder;
import org.neuclear.id.builders.IdentityBuilder;
import org.neuclear.xml.xmlsec.XMLSecurityException;
- import org.dom4j.DocumentHelper;
--- 131,141 ----
import junit.framework.TestCase;
+ import org.dom4j.DocumentHelper;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.CryptoTools;
import org.neuclear.id.builders.AuthenticationTicketBuilder;
import org.neuclear.id.builders.IdentityBuilder;
+ import org.neuclear.id.builders.SignatureRequestBuilder;
import org.neuclear.xml.xmlsec.XMLSecurityException;
***************
*** 218,222 ****
}
! public static void testURL2Path() throws InvalidNamedObject {
assertEquals("/", NSTools.name2path("neu://"));
assertEquals("/test", NSTools.name2path("neu://test"));
--- 221,225 ----
}
! public static void testURL2Path() throws InvalidNamedObjectException {
assertEquals("/", NSTools.name2path("neu://"));
assertEquals("/test", NSTools.name2path("neu://test"));
***************
*** 252,259 ****
public static void testIsNamedObject() throws NeuClearException, XMLSecurityException {
! AuthenticationTicketBuilder builder = new AuthenticationTicketBuilder("neu://test","neu://neuclear.org","http://neuclear.org");
assertTrue(NSTools.isNamedObject(builder.getElement()));
! assertTrue(NSTools.isNamedObject(new SignatureRequestBuilder("neu://neuclear.org","neu://bob@test",builder,"Test").getElement()));
! assertTrue(NSTools.isNamedObject(new IdentityBuilder("neu://test",Identity.getRootPK()).getElement()));
assertFalse(NSTools.isNamedObject(DocumentHelper.createElement("test")));
assertFalse(NSTools.isNamedObject(null));
--- 255,262 ----
public static void testIsNamedObject() throws NeuClearException, XMLSecurityException {
! AuthenticationTicketBuilder builder = new AuthenticationTicketBuilder("neu://test", "neu://neuclear.org", "http://neuclear.org");
assertTrue(NSTools.isNamedObject(builder.getElement()));
! assertTrue(NSTools.isNamedObject(new SignatureRequestBuilder("neu://neuclear.org", "neu://bob@test", builder, "Test").getElement()));
! assertTrue(NSTools.isNamedObject(new IdentityBuilder("neu://test", Identity.getRootPK()).getElement()));
assertFalse(NSTools.isNamedObject(DocumentHelper.createElement("test")));
assertFalse(NSTools.isNamedObject(null));
Index: SignedNamedCoreTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/SignedNamedCoreTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SignedNamedCoreTest.java 22 Nov 2003 00:23:48 -0000 1.3
--- SignedNamedCoreTest.java 11 Dec 2003 23:57:30 -0000 1.4
***************
*** 32,35 ****
--- 32,39 ----
$Id$
$Log$
+ Revision 1.4 2003/12/11 23:57:30 pelle
+ Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+
Revision 1.3 2003/11/22 00:23:48 pelle
All unit tests in commons, id and xmlsec now work.
***************
*** 75,79 ****
final SignedNamedCore core = SignedNamedCore.read(builder.getElement());
assertEquals(core.getSignatory().getName(), name);
! } catch (InvalidNamedObject e) {
assertTrue(e.getLocalizedMessage(), false);
}
--- 79,83 ----
final SignedNamedCore core = SignedNamedCore.read(builder.getElement());
assertEquals(core.getSignatory().getName(), name);
! } catch (InvalidNamedObjectException e) {
assertTrue(e.getLocalizedMessage(), false);
}
|
|
From: <pe...@us...> - 2003-12-11 23:57:33
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv1620/src/java/org/neuclear/tests
Modified Files:
AbstractReceiverTest.java
Log Message:
Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
Index: AbstractReceiverTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/tests/AbstractReceiverTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AbstractReceiverTest.java 21 Nov 2003 04:45:16 -0000 1.5
--- AbstractReceiverTest.java 11 Dec 2003 23:57:29 -0000 1.6
***************
*** 3,7 ****
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.CryptoTools;
! import org.neuclear.id.InvalidNamedObject;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.verifier.VerifyingReader;
--- 3,7 ----
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.CryptoTools;
! import org.neuclear.id.InvalidNamedObjectException;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.verifier.VerifyingReader;
***************
*** 32,35 ****
--- 32,39 ----
$Id$
$Log$
+ Revision 1.6 2003/12/11 23:57:29 pelle
+ Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+
Revision 1.5 2003/11/21 04:45:16 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 139,143 ****
assertTrue(verifyTransaction(obj, prestate));
! } catch (InvalidNamedObject e) {
System.out.println("INVALID " + e.getMessage());
assertTrue(false);
--- 143,147 ----
assertTrue(verifyTransaction(obj, prestate));
! } catch (InvalidNamedObjectException e) {
System.out.println("INVALID " + e.getMessage());
assertTrue(false);
|
|
From: <pe...@us...> - 2003-12-11 23:57:33
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv1620/src/test/org/neuclear/id/builders
Modified Files:
AuthenticationBuilderTest.java SigningRequestBuilderTest.java
Log Message:
Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
Index: AuthenticationBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/AuthenticationBuilderTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AuthenticationBuilderTest.java 10 Dec 2003 23:58:52 -0000 1.4
--- AuthenticationBuilderTest.java 11 Dec 2003 23:57:29 -0000 1.5
***************
*** 3,7 ****
import org.neuclear.auth.AuthenticationTicket;
import org.neuclear.commons.NeuClearException;
! import org.neuclear.id.InvalidNamedObject;
import org.neuclear.tests.AbstractSigningTest;
import org.neuclear.xml.XMLException;
--- 3,7 ----
import org.neuclear.auth.AuthenticationTicket;
import org.neuclear.commons.NeuClearException;
! import org.neuclear.id.InvalidNamedObjectException;
import org.neuclear.tests.AbstractSigningTest;
import org.neuclear.xml.XMLException;
***************
*** 29,32 ****
--- 29,36 ----
$Id$
$Log$
+ Revision 1.5 2003/12/11 23:57:29 pelle
+ Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+
Revision 1.4 2003/12/10 23:58:52 pelle
Did some cleaning up in the builders
***************
*** 75,79 ****
assertEquals(auth.getName(), authreq.getName());
assertEquals(auth.getSiteHref(), "http://users.neuclear.org:8080");
! } catch (InvalidNamedObject e) {
assertTrue(false);
}
--- 79,83 ----
assertEquals(auth.getName(), authreq.getName());
assertEquals(auth.getSiteHref(), "http://users.neuclear.org:8080");
! } catch (InvalidNamedObjectException e) {
assertTrue(false);
}
Index: SigningRequestBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/SigningRequestBuilderTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SigningRequestBuilderTest.java 10 Dec 2003 23:58:52 -0000 1.5
--- SigningRequestBuilderTest.java 11 Dec 2003 23:57:29 -0000 1.6
***************
*** 3,7 ****
import org.neuclear.auth.AuthenticationTicket;
import org.neuclear.commons.NeuClearException;
! import org.neuclear.id.InvalidNamedObject;
import org.neuclear.id.SignatureRequest;
import org.neuclear.tests.AbstractSigningTest;
--- 3,7 ----
import org.neuclear.auth.AuthenticationTicket;
import org.neuclear.commons.NeuClearException;
! import org.neuclear.id.InvalidNamedObjectException;
import org.neuclear.id.SignatureRequest;
import org.neuclear.tests.AbstractSigningTest;
***************
*** 30,33 ****
--- 30,37 ----
$Id$
$Log$
+ Revision 1.6 2003/12/11 23:57:29 pelle
+ Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+
Revision 1.5 2003/12/10 23:58:52 pelle
Did some cleaning up in the builders
***************
*** 88,92 ****
assertEquals(auth.getName(), authreq.getName());
assertEquals(auth.getSiteHref(), "http://users.neuclear.org:8080");
! } catch (InvalidNamedObject e) {
assertTrue(false);
}
--- 92,96 ----
assertEquals(auth.getName(), authreq.getName());
assertEquals(auth.getSiteHref(), "http://users.neuclear.org:8080");
! } catch (InvalidNamedObjectException e) {
assertTrue(false);
}
|
|
From: <pe...@us...> - 2003-12-11 23:57:33
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv1620/src/test/org/neuclear/id/verifier
Modified Files:
VerificationTest.java
Log Message:
Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
Index: VerificationTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/verifier/VerificationTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** VerificationTest.java 6 Dec 2003 00:17:04 -0000 1.9
--- VerificationTest.java 11 Dec 2003 23:57:30 -0000 1.10
***************
*** 5,9 ****
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.CryptoTools;
! import org.neuclear.id.InvalidNamedObject;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.xml.XMLException;
--- 5,9 ----
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.CryptoTools;
! import org.neuclear.id.InvalidNamedObjectException;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.xml.XMLException;
***************
*** 31,34 ****
--- 31,38 ----
$Id$
$Log$
+ Revision 1.10 2003/12/11 23:57:30 pelle
+ Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+
Revision 1.9 2003/12/06 00:17:04 pelle
Updated various areas in NSTools.
***************
*** 125,129 ****
assertTrue(wantValid);
! } catch (InvalidNamedObject e) {
System.out.println("INVALID " + e.getMessage());
assertTrue(!wantValid);
--- 129,133 ----
assertTrue(wantValid);
! } catch (InvalidNamedObjectException e) {
System.out.println("INVALID " + e.getMessage());
assertTrue(!wantValid);
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv1620/src/java/org/neuclear/id
Modified Files:
NSTools.java SignedNamedCore.java
Added Files:
InvalidNamedObjectException.java
Removed Files:
InvalidNamedObject.java
Log Message:
Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
--- NEW FILE: InvalidNamedObjectException.java ---
/*
* $Id: InvalidNamedObjectException.java,v 1.1 2003/12/11 23:57:29 pelle Exp $
* $Log: InvalidNamedObjectException.java,v $
* Revision 1.1 2003/12/11 23:57:29 pelle
* Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
* Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
*
* Revision 1.3 2003/12/10 23:58:51 pelle
* Did some cleaning up in the builders
* Fixed some stuff in IdentityCreator
* New maven goal to create executable jarapp
* We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
* Will release shortly.
*
* Revision 1.2 2003/11/21 04:45:13 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
* 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.
*
* Revision 1.4 2003/11/11 21:18:43 pelle
* Further vital reshuffling.
* org.neudist.crypto.* and org.neudist.utils.* have been moved to respective areas under org.neuclear.commons
* org.neuclear.signers.* as well as org.neuclear.passphraseagents have been moved under org.neuclear.commons.crypto as well.
* Did a bit of work on the Canonicalizer and changed a few other minor bits.
*
* Revision 1.3 2003/10/21 22:31:13 pelle
* Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense.
* Unhooked the XMLException in the xmlsig library from NeuClearException to make all of its exceptions an independent hierarchy.
* Obviously had to perform many changes throughout the code to support these changes.
*
* Revision 1.2 2003/09/24 23:56:48 pelle
* Refactoring nearly done. New model for creating signed objects.
* With view for supporting the xmlpull api shortly for performance reasons.
* Currently still uses dom4j but that has been refactored out that it
* should now be very quick to implement a xmlpull implementation.
*
* A side benefit of this is that the API has been further simplified. I still have some work
* todo with regards to cleaning up some of the outlying parts of the code.
*
* Revision 1.1 2003/09/23 19:16:27 pelle
* Changed NameSpace to Identity.
* To cause less confusion in the future.
*
* Revision 1.2 2003/09/22 19:24:01 pelle
* More fixes throughout to problems caused by renaming.
*
* Revision 1.1.1.1 2003/09/19 14:40:55 pelle
* First import into the neuclear project. This was originally under the SF neuclear
* project. This marks a general major refactoring and renaming ahead.
*
* The new name for this code is NeuClear Identity and has the general package header of
* org.neuclear.id
* There are other areas within the current code which will be split out into other subprojects later on.
* In particularly the signers will be completely seperated out as well as the contract types.
*
*
* Revision 1.3 2003/02/14 21:10:26 pelle
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
* The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
* The Identity object also has a new method receive() which allows one to receive a named object to the Identity's
* default receiver.
*
* Revision 1.2 2003/02/14 05:10:12 pelle
* New Source model is implemented.
* It doesnt quite verify things correctly yet. I'm not yet sure why.
* CommandLineSigner is simplified to make it easier to use.
*
* Revision 1.1.1.1 2002/09/18 10:55:39 pelle
* First release in new CVS structure.
* Also first public release.
* This implemnts simple named objects.
* - Identity Objects
* - NSAuth Objects
*
* Storage systems
* - In Memory Storage
* - Clear text file based storage
* - Encrypted File Storage (with SHA256 digested filenames)
* - CachedStorage
* - SoapStorage
*
* Simple SOAP client/server
* - Simple Single method call SOAP client, for arbitrary dom4j based requests
* - Simple Abstract SOAP Servlet for implementing http based SOAP Servers
*
* Simple XML-Signature Implementation
* - Based on dom4j
* - SHA-RSA only
* - Very simple (likely imperfect) highspeed canonicalizer
* - Zero support for X509 (We dont like that anyway)
* - Super Simple
*
*
* Revision 1.1.1.1 2002/05/29 10:02:20 pelle
* Lets try one more time. This is the first rev of the next gen of Neudist
*
*
*/
package org.neuclear.id;
import org.neuclear.commons.NeuClearException;
public final class InvalidNamedObjectException extends NeuClearException {
public InvalidNamedObjectException(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.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** NSTools.java 11 Dec 2003 16:16:14 -0000 1.19
--- NSTools.java 11 Dec 2003 23:57:29 -0000 1.20
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.20 2003/12/11 23:57:29 pelle
+ * Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ * Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+ *
* Revision 1.19 2003/12/11 16:16:14 pelle
* Some changes to make the xml a bit more readable.
***************
*** 176,180 ****
import org.neuclear.commons.Utility;
import org.neuclear.commons.crypto.CryptoTools;
- import org.neuclear.xml.XMLTools;
import java.util.regex.Matcher;
--- 180,183 ----
***************
*** 193,200 ****
*/
public static String normalizeNameURI(String name) throws NeuClearException {
if (!name.startsWith("neu://"))
name = "neu:/" + name;
if (!isValidName(name))
! throw new InvalidNamedObject("Name: '" + name + "' is not valid");
return name;
}
--- 196,205 ----
*/
public static String normalizeNameURI(String name) throws NeuClearException {
+ if (name == null)
+ return "neu://";
if (!name.startsWith("neu://"))
name = "neu:/" + name;
if (!isValidName(name))
! throw new InvalidNamedObjectException("Name: '" + name + "' is not valid");
return name;
}
***************
*** 252,256 ****
public static String getSignatoryURI(final String uri) throws NeuClearException {
if (!isValidName(uri))
! throw new InvalidNamedObject("Invalid Neu ID: " + uri);
final int bang = uri.indexOf('!');
--- 257,261 ----
public static String getSignatoryURI(final String uri) throws NeuClearException {
if (!isValidName(uri))
! throw new InvalidNamedObjectException("Invalid Neu ID: " + uri);
final int bang = uri.indexOf('!');
***************
*** 280,284 ****
public static String getLocalName(final String uri) throws NeuClearException {
if (!isValidName(uri))
! throw new InvalidNamedObject("Invalid Neu ID: " + uri);
final int bang = uri.indexOf('!');
--- 285,289 ----
public static String getLocalName(final String uri) throws NeuClearException {
if (!isValidName(uri))
! throw new InvalidNamedObjectException("Invalid Neu ID: " + uri);
final int bang = uri.indexOf('!');
***************
*** 354,360 ****
* @param name NEU Name URI
* @return Path
! * @throws InvalidNamedObject If the URI is invalid
*/
! public static String name2path(final String name) throws InvalidNamedObject {
if (!Utility.isEmpty(name)) {
final Matcher matcher = STRIP_URI_ARROBA.matcher(name);
--- 359,365 ----
* @param name NEU Name URI
* @return Path
! * @throws InvalidNamedObjectException If the URI is invalid
*/
! public static String name2path(final String name) throws InvalidNamedObjectException {
if (!Utility.isEmpty(name)) {
final Matcher matcher = STRIP_URI_ARROBA.matcher(name);
***************
*** 363,367 ****
}
}
! throw new InvalidNamedObject("Invalid NEU ID: " + name);
}
--- 368,372 ----
}
}
! throw new InvalidNamedObjectException("Invalid NEU ID: " + name);
}
***************
*** 386,403 ****
* <br><b>Important</b>
* It does not verify if it has been signed.
! * @param node
! * @return
*/
public static boolean isNamedObject(Node node) {
! if (node==null) return false;
! Element elem=null;
if (node instanceof Document)
! elem=((Document)node).getRootElement();
else if (node instanceof Element)
! elem=(Element)node;
else
return false;
! return !Utility.isEmpty(elem.attributeValue(DocumentHelper.createQName("name",NS_NEUID)));
}
--- 391,409 ----
* <br><b>Important</b>
* It does not verify if it has been signed.
! *
! * @param node
! * @return
*/
public static boolean isNamedObject(Node node) {
! if (node == null) return false;
! Element elem = null;
if (node instanceof Document)
! elem = ((Document) node).getRootElement();
else if (node instanceof Element)
! elem = (Element) node;
else
return false;
! return !Utility.isEmpty(elem.attributeValue(DocumentHelper.createQName("name", NS_NEUID)));
}
Index: SignedNamedCore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedCore.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SignedNamedCore.java 10 Dec 2003 23:58:51 -0000 1.5
--- SignedNamedCore.java 11 Dec 2003 23:57:29 -0000 1.6
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.6 2003/12/11 23:57:29 pelle
+ * Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ * Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+ *
* Revision 1.5 2003/12/10 23:58:51 pelle
* Did some cleaning up in the builders
***************
*** 281,285 ****
return new SignedNamedCore(name, signatory, timestamp, new String(XMLSecTools.canonicalize(elem)));
} else
! throw new InvalidNamedObject(name + " isnt valid");
}
--- 285,289 ----
return new SignedNamedCore(name, signatory, timestamp, new String(XMLSecTools.canonicalize(elem)));
} else
! throw new InvalidNamedObjectException(name + " isnt valid");
}
--- InvalidNamedObject.java DELETED ---
|
|
From: <pe...@us...> - 2003-12-11 23:57:32
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store
In directory sc8-pr-cvs1:/tmp/cvs-serv1620/src/java/org/neuclear/store
Modified Files:
FileStore.java
Log Message:
Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
Index: FileStore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/store/FileStore.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** FileStore.java 10 Dec 2003 23:58:52 -0000 1.17
--- FileStore.java 11 Dec 2003 23:57:29 -0000 1.18
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.18 2003/12/11 23:57:29 pelle
+ * Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ * Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+ *
* Revision 1.17 2003/12/10 23:58:52 pelle
* Did some cleaning up in the builders
***************
*** 218,222 ****
}
! // public void store(Document doc) throws InvalidNamedObject,IOException {
// store(new NSDLObject(doc));
// }
--- 222,226 ----
}
! // public void store(Document doc) throws InvalidNamedObjectException,IOException {
// store(new NSDLObject(doc));
// }
|
|
From: <pe...@us...> - 2003-12-11 23:57:32
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver
In directory sc8-pr-cvs1:/tmp/cvs-serv1620/src/java/org/neuclear/id/resolver
Modified Files:
NSResolver.java
Log Message:
Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
Index: NSResolver.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver/NSResolver.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** NSResolver.java 10 Dec 2003 23:58:51 -0000 1.14
--- NSResolver.java 11 Dec 2003 23:57:29 -0000 1.15
***************
*** 3,7 ****
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
! import org.neuclear.id.InvalidNamedObject;
import org.neuclear.id.NSTools;
import org.neuclear.id.SignedNamedObject;
--- 3,7 ----
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
! import org.neuclear.id.InvalidNamedObjectException;
import org.neuclear.id.NSTools;
import org.neuclear.id.SignedNamedObject;
***************
*** 32,40 ****
* @return
*/
! public final static Identity resolveIdentity(final String name) throws NeuClearException, InvalidNamedObject {
final SignedNamedObject id = resolve(name);
if (id instanceof Identity)
return (Identity) id;
! throw new InvalidNamedObject(name + " is not a valid Identity");
}
--- 32,40 ----
* @return
*/
! public final static Identity resolveIdentity(final String name) throws NeuClearException, InvalidNamedObjectException {
final SignedNamedObject id = resolve(name);
if (id instanceof Identity)
return (Identity) id;
! throw new InvalidNamedObjectException(name + " is not a valid Identity");
}
***************
*** 47,51 ****
* @return
*/
! public final static SignedNamedObject resolve(final String name) throws NeuClearException, InvalidNamedObject {
SignedNamedObject obj = NSCACHE.fetchCached(name);
if (obj != null)
--- 47,51 ----
* @return
*/
! public final static SignedNamedObject resolve(final String name) throws NeuClearException, InvalidNamedObjectException {
SignedNamedObject obj = NSCACHE.fetchCached(name);
if (obj != null)
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv1620/src/java/org/neuclear/id/builders
Modified Files:
IdentityBuilder.java NamedObjectBuilder.java
SignatureRequestBuilder.java
Removed Files:
TargetReference.java
Log Message:
Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
Index: IdentityBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/IdentityBuilder.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** IdentityBuilder.java 11 Dec 2003 16:29:26 -0000 1.12
--- IdentityBuilder.java 11 Dec 2003 23:57:29 -0000 1.13
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.13 2003/12/11 23:57:29 pelle
+ * Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ * Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+ *
* Revision 1.12 2003/12/11 16:29:26 pelle
* Updated various builders to use the new helper methods in AbstractElementProxy hopefully making them more readable.
***************
*** 209,213 ****
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);
}
--- 213,217 ----
public IdentityBuilder(final String name, final PublicKey allow, final String repository, final String signer, final String logger, final String receiver) throws NeuClearException {
! this(createNEUIDQName(TAGNAME), name, allow, repository, signer, logger, receiver);
}
***************
*** 232,239 ****
createNEUIDAttribute("logger", receiver);
if (!Utility.isEmpty(signer))
! createNEUIDAttribute("signer",signer);
if (!Utility.isEmpty(receiver))
! createNEUIDAttribute("receiver",receiver);
if (allow != null) {
--- 236,243 ----
createNEUIDAttribute("logger", receiver);
if (!Utility.isEmpty(signer))
! createNEUIDAttribute("signer", signer);
if (!Utility.isEmpty(receiver))
! createNEUIDAttribute("receiver", receiver);
if (allow != null) {
***************
*** 254,260 ****
! public final String getTagName() {
! return "Identity";
! }
--- 258,262 ----
! private static final String TAGNAME = "Identity";
Index: NamedObjectBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/NamedObjectBuilder.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** NamedObjectBuilder.java 11 Dec 2003 16:29:26 -0000 1.17
--- NamedObjectBuilder.java 11 Dec 2003 23:57:29 -0000 1.18
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.18 2003/12/11 23:57:29 pelle
+ * Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ * Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+ *
* Revision 1.17 2003/12/11 16:29:26 pelle
* Updated various builders to use the new helper methods in AbstractElementProxy hopefully making them more readable.
***************
*** 209,213 ****
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.id.verifier.VerifyingReader;
- import org.neuclear.xml.AbstractElementProxy;
import org.neuclear.xml.XMLException;
import org.neuclear.xml.xmlsec.SignedElement;
--- 213,216 ----
***************
*** 254,262 ****
}
- public String getTagName() {
- if (getElement() == null)
- return "Invalid";
- return getElement().getName();
- }
final public SignedNamedObject sign(final Signer signer) throws NeuClearException, XMLException {
--- 257,260 ----
***************
*** 299,311 ****
/**
* Helper method to create and add an attribute to this element within the NEUID namespace
! * @param name
*/
! protected final void createNEUIDAttribute(String name,String value){
! getElement().addAttribute(createNEUIDQName(name),value);
}
/**
* Helper method to create a QName within the NEUID namespace
! * @param name
! * @return
*/
protected static QName createNEUIDQName(String name) {
--- 297,312 ----
/**
* Helper method to create and add an attribute to this element within the NEUID namespace
! *
! * @param name
*/
! protected final void createNEUIDAttribute(String name, String value) {
! getElement().addAttribute(createNEUIDQName(name), value);
}
+
/**
* Helper method to create a QName within the NEUID namespace
! *
! * @param name
! * @return
*/
protected static QName createNEUIDQName(String name) {
***************
*** 325,335 ****
public final String getURI() throws XMLSecurityException {
return getName();
- }
-
- /**
- * @return the XML NameSpace object
- */
- public final Namespace getNS() {
- return NSTools.NS_NEUID;
}
--- 326,329 ----
Index: SignatureRequestBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/SignatureRequestBuilder.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** SignatureRequestBuilder.java 11 Dec 2003 16:29:26 -0000 1.6
--- SignatureRequestBuilder.java 11 Dec 2003 23:57:29 -0000 1.7
***************
*** 1,5 ****
package org.neuclear.id.builders;
- import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.neuclear.commons.NeuClearException;
--- 1,4 ----
***************
*** 28,31 ****
--- 27,34 ----
$Id$
$Log$
+ Revision 1.7 2003/12/11 23:57:29 pelle
+ Trying to test the ReceiverServlet with cactus. Still no luck. Need to return a ElementProxy of some sort.
+ Cleaned up some missing fluff in the ElementProxy interface. getTagName(), getQName() and getNameSpace() have been killed.
+
Revision 1.6 2003/12/11 16:29:26 pelle
Updated various builders to use the new helper methods in AbstractElementProxy hopefully making them more readable.
***************
*** 73,84 ****
final Element unsignedElem = addElement("Unsigned");
unsignedElem.add(unsigned.getElement());
! createAttribute("userid", userid);
if (!Utility.isEmpty(description))
addElement("Description").setText(description);
- }
-
- public final String getTagName() {
- return SignatureRequest.SIGREQUEST_TAG;
}
--- 76,83 ----
final Element unsignedElem = addElement("Unsigned");
unsignedElem.add(unsigned.getElement());
! createAttribute("userid", userid);
if (!Utility.isEmpty(description))
addElement("Description").setText(description);
}
--- TargetReference.java DELETED ---
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv3742/src/java/org/neuclear/id/builders
Modified Files:
AuthenticationTicketBuilder.java IdentityBuilder.java
NamedObjectBuilder.java SignatureRequestBuilder.java
Log Message:
Updated various builders to use the new helper methods in AbstractElementProxy hopefully making them more readable.
Index: AuthenticationTicketBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/AuthenticationTicketBuilder.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** AuthenticationTicketBuilder.java 11 Dec 2003 16:16:14 -0000 1.6
--- AuthenticationTicketBuilder.java 11 Dec 2003 16:29:26 -0000 1.7
***************
*** 31,34 ****
--- 31,37 ----
$Id$
$Log$
+ Revision 1.7 2003/12/11 16:29:26 pelle
+ Updated various builders to use the new helper methods in AbstractElementProxy hopefully making them more readable.
+
Revision 1.6 2003/12/11 16:16:14 pelle
Some changes to make the xml a bit more readable.
***************
*** 79,91 ****
public AuthenticationTicketBuilder(final String user, final String requester, final Date validto, final String site) throws NeuClearException {
super(NSTools.createUniqueTransactionID(user, requester), AuthenticationTicket.TAG_NAME, AuthenticationTicket.NS_NSAUTH);
! getElement().addAttribute(createQName("requester"), NSTools.normalizeNameURI(requester));
! getElement().addAttribute(createQName("validto"), TimeTools.formatTimeStamp(validto));
! getElement().addAttribute(createQName("sitehref"), site);
}
- public final String getTagName() {
- return AuthenticationTicket.TAG_NAME;
- }
}
--- 82,91 ----
public AuthenticationTicketBuilder(final String user, final String requester, final Date validto, final String site) throws NeuClearException {
super(NSTools.createUniqueTransactionID(user, requester), AuthenticationTicket.TAG_NAME, AuthenticationTicket.NS_NSAUTH);
! createAttribute("requester", NSTools.normalizeNameURI(requester));
! createAttribute("validto", TimeTools.formatTimeStamp(validto));
! createAttribute("sitehref", site);
}
}
Index: IdentityBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/IdentityBuilder.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** IdentityBuilder.java 11 Dec 2003 16:16:14 -0000 1.11
--- IdentityBuilder.java 11 Dec 2003 16:29:26 -0000 1.12
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.12 2003/12/11 16:29:26 pelle
+ * Updated various builders to use the new helper methods in AbstractElementProxy hopefully making them more readable.
+ *
* Revision 1.11 2003/12/11 16:16:14 pelle
* Some changes to make the xml a bit more readable.
***************
*** 226,236 ****
addLineBreak();
// We have meaningful defaults for the following two
! root.addAttribute(DocumentHelper.createQName("repository", NSTools.NS_NEUID), repository);
! root.addAttribute(DocumentHelper.createQName("logger", NSTools.NS_NEUID), receiver);
if (!Utility.isEmpty(signer))
! root.addAttribute(DocumentHelper.createQName("signer", NSTools.NS_NEUID), signer);
if (!Utility.isEmpty(receiver))
! root.addAttribute(DocumentHelper.createQName("receiver", NSTools.NS_NEUID), receiver);
if (allow != null) {
--- 229,239 ----
addLineBreak();
// We have meaningful defaults for the following two
! createNEUIDAttribute("repository", repository);
! createNEUIDAttribute("logger", receiver);
if (!Utility.isEmpty(signer))
! createNEUIDAttribute("signer",signer);
if (!Utility.isEmpty(receiver))
! createNEUIDAttribute("receiver",receiver);
if (allow != null) {
Index: NamedObjectBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/NamedObjectBuilder.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** NamedObjectBuilder.java 10 Dec 2003 23:58:51 -0000 1.16
--- NamedObjectBuilder.java 11 Dec 2003 16:29:26 -0000 1.17
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.17 2003/12/11 16:29:26 pelle
+ * Updated various builders to use the new helper methods in AbstractElementProxy hopefully making them more readable.
+ *
* Revision 1.16 2003/12/10 23:58:51 pelle
* Did some cleaning up in the builders
***************
*** 253,257 ****
public String getTagName() {
if (getElement() == null)
! return "Object";
return getElement().getName();
}
--- 256,260 ----
public String getTagName() {
if (getElement() == null)
! return "Invalid";
return getElement().getName();
}
***************
*** 290,297 ****
private static QName getNameAttrQName() {
! return DocumentHelper.createQName("name", NSTools.NS_NEUID);
}
private void createDocument() {
final Element elem = getElement();
--- 293,316 ----
private static QName getNameAttrQName() {
! return createNEUIDQName("name");
}
+ /**
+ * Helper method to create and add an attribute to this element within the NEUID namespace
+ * @param name
+ */
+ protected final void createNEUIDAttribute(String name,String value){
+ getElement().addAttribute(createNEUIDQName(name),value);
+ }
+ /**
+ * Helper method to create a QName within the NEUID namespace
+ * @param name
+ * @return
+ */
+ protected static QName createNEUIDQName(String name) {
+ return DocumentHelper.createQName(name, NSTools.NS_NEUID);
+ }
+
private void createDocument() {
final Element elem = getElement();
***************
*** 313,320 ****
public final Namespace getNS() {
return NSTools.NS_NEUID;
- }
-
- protected final void addElement(final NamedObjectBuilder child) throws XMLException {
- addElement((AbstractElementProxy) child);
}
--- 332,335 ----
Index: SignatureRequestBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/SignatureRequestBuilder.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SignatureRequestBuilder.java 10 Dec 2003 23:58:51 -0000 1.5
--- SignatureRequestBuilder.java 11 Dec 2003 16:29:26 -0000 1.6
***************
*** 28,31 ****
--- 28,34 ----
$Id$
$Log$
+ Revision 1.6 2003/12/11 16:29:26 pelle
+ Updated various builders to use the new helper methods in AbstractElementProxy hopefully making them more readable.
+
Revision 1.5 2003/12/10 23:58:51 pelle
Did some cleaning up in the builders
***************
*** 68,76 ****
public SignatureRequestBuilder(final String requestor, final String userid, final NamedObjectBuilder unsigned, final String description) throws NeuClearException {
super(NSTools.createUniqueTransactionID(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);
if (!Utility.isEmpty(description))
! getElement().addElement(DocumentHelper.createQName("Description")).setText(description);
}
--- 71,79 ----
public SignatureRequestBuilder(final String requestor, final String userid, final NamedObjectBuilder unsigned, final String description) throws NeuClearException {
super(NSTools.createUniqueTransactionID(requestor, userid), SignatureRequest.SIGREQUEST_TAG);
! final Element unsignedElem = addElement("Unsigned");
unsignedElem.add(unsigned.getElement());
! createAttribute("userid", userid);
if (!Utility.isEmpty(description))
! addElement("Description").setText(description);
}
|
|
From: <pe...@us...> - 2003-12-11 16:29:22
|
Update of /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml
In directory sc8-pr-cvs1:/tmp/cvs-serv3713/src/java/org/neuclear/xml
Modified Files:
AbstractElementProxy.java
Log Message:
Updated various builders to use the new helper methods in AbstractElementProxy hopefully making them more readable.
Index: AbstractElementProxy.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/AbstractElementProxy.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AbstractElementProxy.java 11 Dec 2003 16:16:05 -0000 1.5
--- AbstractElementProxy.java 11 Dec 2003 16:29:19 -0000 1.6
***************
*** 2,5 ****
--- 2,8 ----
* $Id$
* $Log$
+ * Revision 1.6 2003/12/11 16:29:19 pelle
+ * Updated various builders to use the new helper methods in AbstractElementProxy hopefully making them more readable.
+ *
* Revision 1.5 2003/12/11 16:16:05 pelle
* Some changes to make the xml a bit more readable.
***************
*** 177,183 ****
--- 180,192 ----
element.addText("\n");
}
+ /**
+ * Adds an attribute with the same namespace as the elment
+ * @param name
+ * @param value
+ */
protected final void createAttribute(String name,String value){
element.addAttribute(createQName(name),value);
}
+
public final QName getQName() {
return new QName(getTagName(), getNS());
|
|
From: <pe...@us...> - 2003-12-11 16:16:17
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv1034/src/test/org/neuclear/id
Modified Files:
NSToolsTest.java
Log Message:
Some changes to make the xml a bit more readable.
Also added some helper methods in AbstractElementProxy to make it easier to build objects.
Index: NSToolsTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/NSToolsTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** NSToolsTest.java 10 Dec 2003 23:58:52 -0000 1.14
--- NSToolsTest.java 11 Dec 2003 16:16:14 -0000 1.15
***************
*** 2,5 ****
--- 2,9 ----
$Id$
$Log$
+ Revision 1.15 2003/12/11 16:16:14 pelle
+ Some changes to make the xml a bit more readable.
+ Also added some helper methods in AbstractElementProxy to make it easier to build objects.
+
Revision 1.14 2003/12/10 23:58:52 pelle
Did some cleaning up in the builders
***************
*** 125,128 ****
--- 129,138 ----
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.CryptoTools;
+ import org.neuclear.id.builders.NamedObjectBuilder;
+ import org.neuclear.id.builders.AuthenticationTicketBuilder;
+ import org.neuclear.id.builders.SignatureRequestBuilder;
+ import org.neuclear.id.builders.IdentityBuilder;
+ import org.neuclear.xml.xmlsec.XMLSecurityException;
+ import org.dom4j.DocumentHelper;
***************
*** 239,242 ****
--- 249,263 ----
assertEquals("test", NSTools.getLocalName("neu://no!test"));
assertEquals("test", NSTools.getLocalName("neu://no@no!test"));
+ }
+
+ public static void testIsNamedObject() throws NeuClearException, XMLSecurityException {
+ AuthenticationTicketBuilder builder = new AuthenticationTicketBuilder("neu://test","neu://neuclear.org","http://neuclear.org");
+ assertTrue(NSTools.isNamedObject(builder.getElement()));
+ assertTrue(NSTools.isNamedObject(new SignatureRequestBuilder("neu://neuclear.org","neu://bob@test",builder,"Test").getElement()));
+ assertTrue(NSTools.isNamedObject(new IdentityBuilder("neu://test",Identity.getRootPK()).getElement()));
+ assertFalse(NSTools.isNamedObject(DocumentHelper.createElement("test")));
+ assertFalse(NSTools.isNamedObject(null));
+
+
}
}
|
|
From: <pe...@us...> - 2003-12-11 16:16:17
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv1034/src/java/org/neuclear/id
Modified Files:
NSTools.java
Log Message:
Some changes to make the xml a bit more readable.
Also added some helper methods in AbstractElementProxy to make it easier to build objects.
Index: NSTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NSTools.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** NSTools.java 10 Dec 2003 23:58:51 -0000 1.18
--- NSTools.java 11 Dec 2003 16:16:14 -0000 1.19
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.19 2003/12/11 16:16:14 pelle
+ * Some changes to make the xml a bit more readable.
+ * Also added some helper methods in AbstractElementProxy to make it easier to build objects.
+ *
* Revision 1.18 2003/12/10 23:58:51 pelle
* Did some cleaning up in the builders
***************
*** 168,176 ****
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.digests.SHA1Digest;
! import org.dom4j.DocumentHelper;
! import org.dom4j.Namespace;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.Utility;
import org.neuclear.commons.crypto.CryptoTools;
import java.util.regex.Matcher;
--- 172,180 ----
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.digests.SHA1Digest;
! import org.dom4j.*;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.Utility;
import org.neuclear.commons.crypto.CryptoTools;
+ import org.neuclear.xml.XMLTools;
import java.util.regex.Matcher;
***************
*** 376,379 ****
--- 380,403 ----
return null;
+ }
+
+ /**
+ * Verifies that Dom4j node is an element or document containing a NamedObject.
+ * <br><b>Important</b>
+ * It does not verify if it has been signed.
+ * @param node
+ * @return
+ */
+ public static boolean isNamedObject(Node node) {
+
+ if (node==null) return false;
+ Element elem=null;
+ if (node instanceof Document)
+ elem=((Document)node).getRootElement();
+ else if (node instanceof Element)
+ elem=(Element)node;
+ else
+ return false;
+ return !Utility.isEmpty(elem.attributeValue(DocumentHelper.createQName("name",NS_NEUID)));
}
|
|
From: <pe...@us...> - 2003-12-11 16:16:17
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/tools/commandline
In directory sc8-pr-cvs1:/tmp/cvs-serv1034/src/java/org/neuclear/id/tools/commandline
Modified Files:
IdentityCreator.java
Log Message:
Some changes to make the xml a bit more readable.
Also added some helper methods in AbstractElementProxy to make it easier to build objects.
Index: IdentityCreator.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/tools/commandline/IdentityCreator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** IdentityCreator.java 10 Dec 2003 23:58:51 -0000 1.2
--- IdentityCreator.java 11 Dec 2003 16:16:14 -0000 1.3
***************
*** 1,4 ****
--- 1,8 ----
/* $Id$
* $Log$
+ * Revision 1.3 2003/12/11 16:16:14 pelle
+ * Some changes to make the xml a bit more readable.
+ * Also added some helper methods in AbstractElementProxy to make it easier to build objects.
+ *
* Revision 1.2 2003/12/10 23:58:51 pelle
* Did some cleaning up in the builders
***************
*** 219,224 ****
alias = Utility.denullString(alias, NSTools.getSignatoryURI(identity));
}
-
-
}
--- 223,226 ----
|
|
From: <pe...@us...> - 2003-12-11 16:16:17
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv1034/src/java/org/neuclear/id/builders
Modified Files:
AuthenticationTicketBuilder.java IdentityBuilder.java
Log Message:
Some changes to make the xml a bit more readable.
Also added some helper methods in AbstractElementProxy to make it easier to build objects.
Index: AuthenticationTicketBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/AuthenticationTicketBuilder.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AuthenticationTicketBuilder.java 10 Dec 2003 23:58:51 -0000 1.5
--- AuthenticationTicketBuilder.java 11 Dec 2003 16:16:14 -0000 1.6
***************
*** 31,34 ****
--- 31,38 ----
$Id$
$Log$
+ Revision 1.6 2003/12/11 16:16:14 pelle
+ Some changes to make the xml a bit more readable.
+ Also added some helper methods in AbstractElementProxy to make it easier to build objects.
+
Revision 1.5 2003/12/10 23:58:51 pelle
Did some cleaning up in the builders
***************
*** 80,86 ****
}
- private static QName createQName(final String name) {
- return DocumentHelper.createQName(name, AuthenticationTicket.NS_NSAUTH);
- }
public final String getTagName() {
--- 84,87 ----
Index: IdentityBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/IdentityBuilder.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** IdentityBuilder.java 10 Dec 2003 23:58:51 -0000 1.10
--- IdentityBuilder.java 11 Dec 2003 16:16:14 -0000 1.11
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.11 2003/12/11 16:16:14 pelle
+ * Some changes to make the xml a bit more readable.
+ * Also added some helper methods in AbstractElementProxy to make it easier to build objects.
+ *
* Revision 1.10 2003/12/10 23:58:51 pelle
* Did some cleaning up in the builders
***************
*** 220,223 ****
--- 224,228 ----
final Element root = getElement();
+ addLineBreak();
// We have meaningful defaults for the following two
root.addAttribute(DocumentHelper.createQName("repository", NSTools.NS_NEUID), repository);
***************
*** 232,235 ****
--- 237,241 ----
final QName allowName = DocumentHelper.createQName("allow", NSTools.NS_NEUID);
final Element pub = root.addElement(allowName);
+ pub.addText("\n");
pub.add(XMLSecTools.createKeyInfo(allow));
}
|
|
From: <pe...@us...> - 2003-12-11 16:16:08
|
Update of /cvsroot/neuclear/neuclear-xmlsig In directory sc8-pr-cvs1:/tmp/cvs-serv1004 Modified Files: project.properties Log Message: Some changes to make the xml a bit more readable. Also added some helper methods in AbstractElementProxy to make it easier to build objects. Index: project.properties =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/project.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** project.properties 28 Nov 2003 00:12:36 -0000 1.5 --- project.properties 11 Dec 2003 16:16:05 -0000 1.6 *************** *** 20,22 **** #maven.ui.property.file = ui.properties maven.repo.remote = http://www.ibiblio.org/maven/,http://dist.codehaus.org/,http://neuclear.org/maven/ ! maven.test.skip=true --- 20,22 ---- #maven.ui.property.file = ui.properties maven.repo.remote = http://www.ibiblio.org/maven/,http://dist.codehaus.org/,http://neuclear.org/maven/ ! #maven.test.skip=true |
|
From: <pe...@us...> - 2003-12-11 16:16:08
|
Update of /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml
In directory sc8-pr-cvs1:/tmp/cvs-serv1004/src/java/org/neuclear/xml
Modified Files:
AbstractElementProxy.java
Log Message:
Some changes to make the xml a bit more readable.
Also added some helper methods in AbstractElementProxy to make it easier to build objects.
Index: AbstractElementProxy.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/AbstractElementProxy.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AbstractElementProxy.java 10 Dec 2003 23:57:05 -0000 1.4
--- AbstractElementProxy.java 11 Dec 2003 16:16:05 -0000 1.5
***************
*** 2,5 ****
--- 2,9 ----
* $Id$
* $Log$
+ * Revision 1.5 2003/12/11 16:16:05 pelle
+ * Some changes to make the xml a bit more readable.
+ * Also added some helper methods in AbstractElementProxy to make it easier to build objects.
+ *
* Revision 1.4 2003/12/10 23:57:05 pelle
* Did some cleaning up in the builders
***************
*** 121,133 ****
}
! protected final void addElement(final AbstractElementProxy child) throws XMLException {
addElement(child.getElement());
}
! protected final void addElement(final Element child) throws XMLException {
element.add(child);
! element.addText("\n");
}
public final QName getQName() {
return new QName(getTagName(), getNS());
--- 125,183 ----
}
! /**
! * Adds another AbstractElementProxy as a child element to this Element
! * @param child
! */
! protected final Element addElement(final AbstractElementProxy child) {
addElement(child.getElement());
+ return child.getElement();
}
! /**
! * Adds another Element as a child element to this Element
! * @param child
! */
! protected final Element addElement(final Element child) {
element.add(child);
! addLineBreak();
! return element;
! }
! /**
! * Adds another Element with the given QName to this Element
! * @param child
! */
! protected final Element addElement(final QName child) {
! Element element = DocumentHelper.createElement(child);
! addElement(element);
! return element;
! }
! /**
! * Adds another Element with the given name and the same Namespace as this element to this element.
! * @param child
! */
! protected final Element addElement(final String child) {
! Element element = DocumentHelper.createElement(createQName(child));
! addElement(element);
! return element;
! }
!
! /**
! * Creates a QName in this object namespace
! * @param child
! * @return
! */
! protected QName createQName(final String child) {
! return DocumentHelper.createQName(child,this.element.getNamespace());
}
+ /**
+ * Adds a linebreak to the xml, making it easier to read for humans
+ */
+ protected final void addLineBreak(){
+ element.addText("\n");
+ }
+ protected final void createAttribute(String name,String value){
+ element.addAttribute(createQName(name),value);
+ }
public final QName getQName() {
return new QName(getTagName(), getNS());
|
|
From: <pe...@us...> - 2003-12-11 16:16:08
|
Update of /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/xmlsec
In directory sc8-pr-cvs1:/tmp/cvs-serv1004/src/java/org/neuclear/xml/xmlsec
Modified Files:
KeyInfo.java
Log Message:
Some changes to make the xml a bit more readable.
Also added some helper methods in AbstractElementProxy to make it easier to build objects.
Index: KeyInfo.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/java/org/neuclear/xml/xmlsec/KeyInfo.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** KeyInfo.java 21 Nov 2003 04:44:31 -0000 1.2
--- KeyInfo.java 11 Dec 2003 16:16:05 -0000 1.3
***************
*** 26,51 ****
this.pub = pub;
final Element kv = XMLSecTools.createElementInSignatureSpace("KeyValue");
! getElement().add(kv);
if (pub instanceof RSAPublicKey) {
final RSAPublicKey rsakey = (RSAPublicKey) pub;
final Element rsav = XMLSecTools.createElementInSignatureSpace("RSAKeyValue");
kv.add(rsav);
final Element mod = XMLSecTools.bigIntToElement("Modulus", rsakey.getModulus());
rsav.add(mod);
final Element exp = XMLSecTools.bigIntToElement("Exponent", rsakey.getPublicExponent());
rsav.add(exp);
} else if ( pub instanceof DSAPublicKey ) {
final DSAPublicKey dsaKey = (DSAPublicKey) pub;
final Element dsav = XMLSecTools.createElementInSignatureSpace("DSAKeyValue");
kv.add(dsav);
final DSAParams dsaParams = dsaKey.getParams();
final Element p = XMLSecTools.bigIntToElement("P", dsaParams.getP());
dsav.add(p); //optional and tied to Q
final Element q = XMLSecTools.bigIntToElement("Q", dsaParams.getQ());
dsav.add(q); //optional and tied to P
final Element g = XMLSecTools.bigIntToElement("G", dsaParams.getG());
dsav.add(g); //optional
final Element y = XMLSecTools.bigIntToElement("Y", dsaKey.getY());
dsav.add(y);
//J = (P-1) / Q
//seed and pgenCounter
--- 26,59 ----
this.pub = pub;
final Element kv = XMLSecTools.createElementInSignatureSpace("KeyValue");
! addElement(kv);
if (pub instanceof RSAPublicKey) {
final RSAPublicKey rsakey = (RSAPublicKey) pub;
final Element rsav = XMLSecTools.createElementInSignatureSpace("RSAKeyValue");
kv.add(rsav);
+ kv.addText("\n");
final Element mod = XMLSecTools.bigIntToElement("Modulus", rsakey.getModulus());
rsav.add(mod);
+ rsav.addText("\n");
final Element exp = XMLSecTools.bigIntToElement("Exponent", rsakey.getPublicExponent());
rsav.add(exp);
+ rsav.addText("\n");
} else if ( pub instanceof DSAPublicKey ) {
final DSAPublicKey dsaKey = (DSAPublicKey) pub;
final Element dsav = XMLSecTools.createElementInSignatureSpace("DSAKeyValue");
kv.add(dsav);
+ kv.addText("\n");
final DSAParams dsaParams = dsaKey.getParams();
final Element p = XMLSecTools.bigIntToElement("P", dsaParams.getP());
dsav.add(p); //optional and tied to Q
+ dsav.addText("\n");
final Element q = XMLSecTools.bigIntToElement("Q", dsaParams.getQ());
dsav.add(q); //optional and tied to P
+ dsav.addText("\n");
final Element g = XMLSecTools.bigIntToElement("G", dsaParams.getG());
dsav.add(g); //optional
+ dsav.addText("\n");
final Element y = XMLSecTools.bigIntToElement("Y", dsaKey.getY());
dsav.add(y);
+ dsav.addText("\n");
//J = (P-1) / Q
//seed and pgenCounter
|
|
From: <pe...@us...> - 2003-12-11 03:37:46
|
Update of /cvsroot/neuclear/neuclear-id In directory sc8-pr-cvs1:/tmp/cvs-serv3503 Modified Files: project.properties Log Message: Got rid of cactus from the executable. We wont be doing no web tests here... Index: project.properties =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/project.properties,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** project.properties 10 Dec 2003 23:58:53 -0000 1.21 --- project.properties 11 Dec 2003 03:37:43 -0000 1.22 *************** *** 21,25 **** maven.javaapp.mainclass = org.neuclear.id.tools.commandline.IdentityCreator maven.jar.mainclass = org.neuclear.id.tools.commandline.IdentityCreator ! maven.javaapp.jar.exclude=junit,servletapi,javamail,activation maven.jar.index = true --- 21,25 ---- maven.javaapp.mainclass = org.neuclear.id.tools.commandline.IdentityCreator maven.jar.mainclass = org.neuclear.id.tools.commandline.IdentityCreator ! maven.javaapp.jar.exclude=junit,servletapi,javamail,activation,cactus maven.jar.index = true |
|
From: <pe...@us...> - 2003-12-10 23:58:56
|
Update of /cvsroot/neuclear/neuclear-id/xdocs
In directory sc8-pr-cvs1:/tmp/cvs-serv1921/xdocs
Modified Files:
bdg.xml installation.xml
Log Message:
Did some cleaning up in the builders
Fixed some stuff in IdentityCreator
New maven goal to create executable jarapp
We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
Will release shortly.
Index: bdg.xml
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/xdocs/bdg.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** bdg.xml 9 Dec 2003 23:41:45 -0000 1.3
--- bdg.xml 10 Dec 2003 23:58:52 -0000 1.4
***************
*** 2,12 ****
<document>
! <properties>
! <title>The Busy Developer's Guide to the NeuClear ID API</title>
! <author email="pe...@ne...">Pelle Braendgaard</author>
! </properties>
! <body>
! <section name="The Busy Developer's Guide to the NeuClear ID API">
<h4>Scope</h4>
--- 2,12 ----
<document>
! <properties>
! <title>The Busy Developer's Guide to the NeuClear ID API</title>
! <author email="pe...@ne...">Pelle Braendgaard</author>
! </properties>
! <body>
! <section name="The Busy Developer's Guide to the NeuClear ID API">
<h4>Scope</h4>
***************
*** 22,34 ****
</p>
<h4>Purpose</h4>
! <p>
The main purpose of the NeuClear ID API is to provide a simple framework and API for building applications
using a Public Key Infrastructure (PKI).
! </p>
</section>
<section name="Creating an Top Level Identity for your Domain Name">
<p>
! All messages (<a href="apidocs/org/neuclear/id/SignedNamedObject.html">SignedNamedObjects</a> in NeuClear lingo)
! in NeuClear ID must be signed by an <a href="apidocs/org/neuclear/id/Identity.html">Identity</a>. So to get started we
must first create a new Identity.
</p>
--- 22,36 ----
</p>
<h4>Purpose</h4>
! <p>
The main purpose of the NeuClear ID API is to provide a simple framework and API for building applications
using a Public Key Infrastructure (PKI).
! </p>
</section>
<section name="Creating an Top Level Identity for your Domain Name">
<p>
! All messages (
! <a href="apidocs/org/neuclear/id/SignedNamedObject.html">SignedNamedObjects</a> in NeuClear lingo)
! in NeuClear ID must be signed by an
! <a href="apidocs/org/neuclear/id/Identity.html">Identity</a>. So to get started we
must first create a new Identity.
</p>
***************
*** 37,43 ****
</p>
<p>
! The easiest way to get started is to use the neuclear-id-uber.jar from a command line.
We need to have the following ready:
! </p>
<ul>
<li>The Name</li>
--- 39,45 ----
</p>
<p>
! The easiest way to get started is to use the neuclear-id-app.jar from a command line.
We need to have the following ready:
! </p>
<ul>
<li>The Name</li>
***************
*** 54,64 ****
<p>
Now we know the name of our new identity we first need to create our keypair. Sun provides us with a very badly designed
! tool called <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/keytool.html">keytool</a> which we can use to
create and store our keypair. The NeuClear toolset will provide its own keygeneration tools soon, but for now we've got to do it like this:
</p>
! <source>$ keytool -genkey -keyalg RSA -alias <b>neu://yourdomain.com</b>
Enter keystore password: #####
What is your first and last name?
! [Unknown]: <b>neu://yourdomain.com</b>
What is the name of your organizational unit?
[Unknown]: Your Domain
--- 56,69 ----
<p>
Now we know the name of our new identity we first need to create our keypair. Sun provides us with a very badly designed
! tool called
! <a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/keytool.html">keytool</a> which we can use to
create and store our keypair. The NeuClear toolset will provide its own keygeneration tools soon, but for now we've got to do it like this:
</p>
! <source>$ keytool -genkey -keyalg RSA -alias
! <b>neu://yourdomain.com</b>
Enter keystore password: #####
What is your first and last name?
! [Unknown]:
! <b>neu://yourdomain.com</b>
What is the name of your organizational unit?
[Unknown]: Your Domain
***************
*** 75,94 ****
Enter key password for neu://yourdomain.com
! (RETURN if same as keystore password):</source>
<p>
! What you can see there is the invocation of keytool with the <tt>-genkey</tt> option.
We pick a RSA key, which is recommended over the default DSA key. The alias must be the same as the ID that you are creating.
The details about first and last name location etc, are pretty much irrelevant for our purposes, but by convension we like to
! put the ID (eg. <tt>neu://yourdomain.com</tt>) in the first and last name field. What might not be immediately obvious here
! is that keytool creates a default keystore in your home directory at <tt>~/.keystore</tt> this contains your keys and the
neuclear tools use this keystore later on.
</p>
<h4>Create the Selfsigned Certificate</h4>
<p>
! Download the <a href="http://neuclear.org/maven/neuclear-id/jars/neuclear-id-0.8-SNAPSHOT-uber.jar">NeuClear ID Executable</a>.
Excuse the long and ugly name, we will package it nicer later on. Currently this tool allows you to create a certificate and
sign it. Lets run it with our ID and receiver we decided on earlier.
</p>
! <source>$ java -jar neuclear-id-0.8-SNAPSHOT-uber.jar --name neu://yourdomain.com --receiver mailto:ad...@yo...
Please enter passphrase for: KeyStore Passphrase for~/.keystore
:
--- 80,104 ----
Enter key password for neu://yourdomain.com
! (RETURN if same as keystore password):
! </source>
<p>
! What you can see there is the invocation of keytool with the
! <tt>-genkey</tt> option.
We pick a RSA key, which is recommended over the default DSA key. The alias must be the same as the ID that you are creating.
The details about first and last name location etc, are pretty much irrelevant for our purposes, but by convension we like to
! put the ID (eg.
! <tt>neu://yourdomain.com</tt>) in the first and last name field. What might not be immediately obvious here
! is that keytool creates a default keystore in your home directory at
! <tt>~/.keystore</tt> this contains your keys and the
neuclear tools use this keystore later on.
</p>
<h4>Create the Selfsigned Certificate</h4>
<p>
! Download the
! <a href="http://neuclear.org/maven/neuclear-id/jars/neuclear-id-app-0.8.jar">NeuClear ID Executable</a>.
Excuse the long and ugly name, we will package it nicer later on. Currently this tool allows you to create a certificate and
sign it. Lets run it with our ID and receiver we decided on earlier.
</p>
! <source>$ java -jar neuclear-id-app-0.8.jar --name neu://yourdomain.com --receiver mailto:ad...@yo...
Please enter passphrase for: KeyStore Passphrase for~/.keystore
:
***************
*** 99,113 ****
<p>
The program asks you for the passphrases for both the keystore and your key. Enter them exactly like you did
! before. As the program has to initialise all sorts of cryptographic processes, it might seem a bit slow, but be patient.
</p>
<h4>Copy certificate to Web Server</h4>
<p>
The Certificate must now be moved to your web server. It has to live in the following file:
! <tt>http://yourdomain.com/_NEUID/yourdomain.com/root.id</tt><br/>
! The simplest way to do this in unix is to use <tt>scp</tt>:
</p>
! <source>scp -r _NEUID/ <b>us...@yo...:/home/httpd/htdocs/</b></source>
<p>
! where <tt>user</tt> is your username on the webserver. <tt>yourdomain.com</tt> is webserver domain name and
<tt>/home/httpd/htdocs/</tt> the full absolute path to the root of your web server.
</p>
--- 109,129 ----
<p>
The program asks you for the passphrases for both the keystore and your key. Enter them exactly like you did
! before.
</p>
<h4>Copy certificate to Web Server</h4>
<p>
The Certificate must now be moved to your web server. It has to live in the following file:
! <tt>http://yourdomain.com/_NEUID/yourdomain.com/root.id</tt>
! <br/>
! The simplest way to do this in unix is to use
! <tt>scp</tt>:
</p>
! <source>scp -r _NEUID/
! <b>us...@yo...:/home/httpd/htdocs/</b>
! </source>
<p>
! where
! <tt>user</tt> is your username on the webserver.
! <tt>yourdomain.com</tt> is webserver domain name and
<tt>/home/httpd/htdocs/</tt> the full absolute path to the root of your web server.
</p>
***************
*** 117,121 ****
To verify an Identity type the following in your command prompt:
</p>
! <source>$ java -jar neuclear-id-0.8-SNAPSHOT-uber.jar --verify neu://pelle@neuclear.org
Resolving and Verifying: neu://pelle@neuclear.org
Signed Object: neu://pelle@neuclear.org is verified
--- 133,137 ----
To verify an Identity type the following in your command prompt:
</p>
! <source>$ java -jar neuclear-id-app-0.8.jar --verify neu://pelle@neuclear.org
Resolving and Verifying: neu://pelle@neuclear.org
Signed Object: neu://pelle@neuclear.org is verified
***************
*** 140,145 ****
</p>
<ul>
! <li><tt>neu://bob@yourdomain.com</tt></li>
! <li><tt>neu://sales@yourdomain.com</tt></li>
</ul>
<p>
--- 156,165 ----
</p>
<ul>
! <li>
! <tt>neu://bob@yourdomain.com</tt>
! </li>
! <li>
! <tt>neu://sales@yourdomain.com</tt>
! </li>
</ul>
<p>
***************
*** 148,153 ****
</p>
<ul>
! <li><tt>neu://yourdomain.com/store</tt></li>
! <li><tt>neu://yourdomain.com/homebanking</tt></li>
</ul>
<p>
--- 168,177 ----
</p>
<ul>
! <li>
! <tt>neu://yourdomain.com/store</tt>
! </li>
! <li>
! <tt>neu://yourdomain.com/homebanking</tt>
! </li>
</ul>
<p>
***************
*** 156,160 ****
</p>
<p>
! So for our example we picked <tt>neu://bob@yourdomain.com</tt>
</p>
<h4>Creating the Key Pair</h4>
--- 180,185 ----
</p>
<p>
! So for our example we picked
! <tt>neu://bob@yourdomain.com</tt>
</p>
<h4>Creating the Key Pair</h4>
***************
*** 162,169 ****
Create a new keypair just like you did before:
</p>
! <source>$ keytool -genkey -keyalg RSA -alias <b>neu://bob@yourdomain.com</b>
Enter keystore password: #####
What is your first and last name?
! [Unknown]: <b>neu://bob@yourdomain.com</b>
What is the name of your organizational unit?
[Unknown]: Your Domain
--- 187,196 ----
Create a new keypair just like you did before:
</p>
! <source>$ keytool -genkey -keyalg RSA -alias
! <b>neu://bob@yourdomain.com</b>
Enter keystore password: #####
What is your first and last name?
! [Unknown]:
! <b>neu://bob@yourdomain.com</b>
What is the name of your organizational unit?
[Unknown]: Your Domain
***************
*** 180,192 ****
Enter key password for neu://bob@yourdomain.com
! (RETURN if same as keystore password):</source>
<h4>Create the Signed Certificate</h4>
! <p>
Again we need to create a certificate. This time however it is not self signed, but signed
by the top level identity we created above. As long as we create the two identities on the same
machine. The process is completely identical from a users stand point, with the notable exception
that we are asked for the root identity's passphrase and not the one of the sub identity.
! </p>
! <source>$ java -jar neuclear-id-0.8-SNAPSHOT-uber.jar --name neu://bob@yourdomain.com --receiver mailto:bo...@yo...
Please enter passphrase for: KeyStore Passphrase for~/.keystore
:
--- 207,220 ----
Enter key password for neu://bob@yourdomain.com
! (RETURN if same as keystore password):
! </source>
<h4>Create the Signed Certificate</h4>
! <p>
Again we need to create a certificate. This time however it is not self signed, but signed
by the top level identity we created above. As long as we create the two identities on the same
machine. The process is completely identical from a users stand point, with the notable exception
that we are asked for the root identity's passphrase and not the one of the sub identity.
! </p>
! <source>$ java -jar neuclear-id-app-0.8.jar --name neu://bob@yourdomain.com --receiver mailto:bo...@yo...
Please enter passphrase for: KeyStore Passphrase for~/.keystore
:
***************
*** 208,212 ****
! </body>
</document>
--- 236,240 ----
! </body>
</document>
Index: installation.xml
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/xdocs/installation.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** installation.xml 9 Dec 2003 23:41:45 -0000 1.4
--- installation.xml 10 Dec 2003 23:58:52 -0000 1.5
***************
*** 2,27 ****
<document>
! <properties>
! <title>Installing</title>
! <author email="pe...@ne...">Pelle Braendgaard</author>
! </properties>
! <body>
<section name="Requirements">
<p>
! Any JRE 1.4 VM should work. <a href="http://www.java.com:80/en/download/manual.jsp">Get the latest for your platform straight from Sun</a>.
If you are running Mac OS/X Jaguar or Panther you should already be set. Please let us know of any problems.
</p>
<p>
! Download the <a href="http://neuclear.org/maven/neuclear-id/jars/neuclear-id-0.8-SNAPSHOT-uber.jar">NeuClear ID Executable</a>.
Excuse the long and ugly name, we will package it nicer later on. Currently this tool allows you to create a certificate and
sign it. The jar file also contains all the required libraries and should be suitable for unpacking and
adding to your favorite IDE's classpath.
! </p>
</section>
! <section name="Requirements for Building">
<p>
! To build the NeuClear framework you first need to install <a href="http://maven.apache.org/">Maven</a>.
Follow their installation instructions and you should be ok. I haven't tried this under windows yet, but I'm guessing
it should work fine. Maven fetches all the required libraries you need the first time you attempt to build it. There are however
--- 2,30 ----
<document>
! <properties>
! <title>Installing</title>
! <author email="pe...@ne...">Pelle Braendgaard</author>
! </properties>
! <body>
<section name="Requirements">
<p>
! Any JRE 1.4 VM should work.
! <a href="http://www.java.com:80/en/download/manual.jsp">Get the latest for your platform straight from Sun</a>.
If you are running Mac OS/X Jaguar or Panther you should already be set. Please let us know of any problems.
</p>
<p>
! Download the
! <a href="http://neuclear.org/maven/neuclear-id/jars/neuclear-id-app-0.8-SNAPSHOT.jar">NeuClear ID Executable</a>.
Excuse the long and ugly name, we will package it nicer later on. Currently this tool allows you to create a certificate and
sign it. The jar file also contains all the required libraries and should be suitable for unpacking and
adding to your favorite IDE's classpath.
! </p>
</section>
! <section name="Requirements for Building">
<p>
! To build the NeuClear framework you first need to install
! <a href="http://maven.apache.org/">Maven</a>.
Follow their installation instructions and you should be ok. I haven't tried this under windows yet, but I'm guessing
it should work fine. Maven fetches all the required libraries you need the first time you attempt to build it. There are however
***************
*** 33,37 ****
</p>
<p>
! If you want to get them yourself. Get the latest version of <a href="http://www.opensymphony.org">OSCore</a> and
<a href="http://www.bouncycastle.org">Bouncy Castle Crypto</a>. For Bouncy Castle Crypto you need a JCE and a provider.
If you're using JDK1.4 you will allready have a JCE. Otherwise the easiest thing todo is to get their combined JCE/Provider.
--- 36,41 ----
</p>
<p>
! If you want to get them yourself. Get the latest version of
! <a href="http://www.opensymphony.org">OSCore</a> and
<a href="http://www.bouncycastle.org">Bouncy Castle Crypto</a>. For Bouncy Castle Crypto you need a JCE and a provider.
If you're using JDK1.4 you will allready have a JCE. Otherwise the easiest thing todo is to get their combined JCE/Provider.
***************
*** 40,44 ****
</p>
<p>
! Remember to edit your <tt>$JAVA_HOME/jre/lib/security/java.security</tt> file as well. Adding the following line:
</p>
<source>
--- 44,49 ----
</p>
<p>
! Remember to edit your
! <tt>$JAVA_HOME/jre/lib/security/java.security</tt> file as well. Adding the following line:
</p>
<source>
***************
*** 47,52 ****
<p>Making sure to change the 6 to whatever the last number is in the sequence of providers</p>
<p>
! In Addition to play around with it you will need a J2EE compliant servlet engine such as <a href="http://jakarta.apache.org/tomcat/">Jakarta Tomcat</a>
! or <a href="http://jetty.mortbay.org">Jetty</a>. Install this as required.
</p>
</section>
--- 52,59 ----
<p>Making sure to change the 6 to whatever the last number is in the sequence of providers</p>
<p>
! In Addition to play around with it you will need a J2EE compliant servlet engine such as
! <a href="http://jakarta.apache.org/tomcat/">Jakarta Tomcat</a>
! or
! <a href="http://jetty.mortbay.org">Jetty</a>. Install this as required.
</p>
</section>
***************
*** 62,67 ****
<source>~/projects/neuclear-id> maven war</source>
<p>
! This should build everything and create a neuclear-id.war file in <tt>target/</tt>. You can then deploy
! this war file in your J2EE compliant servlet engine. eg. place it in tomcat or jetty's <tt>webapps/</tt> directory
and restart.
</p>
--- 69,76 ----
<source>~/projects/neuclear-id> maven war</source>
<p>
! This should build everything and create a neuclear-id.war file in
! <tt>target/</tt>. You can then deploy
! this war file in your J2EE compliant servlet engine. eg. place it in tomcat or jetty's
! <tt>webapps/</tt> directory
and restart.
</p>
|
|
From: <pe...@us...> - 2003-12-10 23:58:56
|
Update of /cvsroot/neuclear/neuclear-id In directory sc8-pr-cvs1:/tmp/cvs-serv1921 Modified Files: project.properties project.xml Log Message: Did some cleaning up in the builders Fixed some stuff in IdentityCreator New maven goal to create executable jarapp We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons. Will release shortly. Index: project.properties =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/project.properties,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** project.properties 9 Dec 2003 23:41:44 -0000 1.20 --- project.properties 10 Dec 2003 23:58:53 -0000 1.21 *************** *** 19,22 **** --- 19,27 ---- maven.test.skip=true + maven.javaapp.mainclass = org.neuclear.id.tools.commandline.IdentityCreator + maven.jar.mainclass = org.neuclear.id.tools.commandline.IdentityCreator + maven.javaapp.jar.exclude=junit,servletapi,javamail,activation + + maven.jar.index = true maven.uberjar.main = org.neuclear.id.tools.commandline.IdentityCreator maven.repo.central = neuclear.org Index: project.xml =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/project.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** project.xml 8 Dec 2003 22:05:09 -0000 1.20 --- project.xml 10 Dec 2003 23:58:53 -0000 1.21 *************** *** 4,8 **** <name>NeuClear Identity Framework</name> <id>neuclear-id</id> ! <currentVersion>0.8-SNAPSHOT</currentVersion> <inceptionYear>2002</inceptionYear> <package>org.neuclear</package> --- 4,8 ---- <name>NeuClear Identity Framework</name> <id>neuclear-id</id> ! <currentVersion>0.8</currentVersion> <inceptionYear>2002</inceptionYear> <package>org.neuclear</package> *************** *** 71,75 **** <id>neuclear-xmlsig</id> <name>neuclear-xmlsig</name> ! <version>0.11-SNAPSHOT</version> <properties> <war.bundle>true</war.bundle> --- 71,75 ---- <id>neuclear-xmlsig</id> <name>neuclear-xmlsig</name> ! <version>0.11</version> <properties> <war.bundle>true</war.bundle> *************** *** 80,84 **** <id>neuclear-commons</id> <name>neuclear-commons</name> ! <version>0.5-SNAPSHOT</version> <properties> <war.bundle>true</war.bundle> --- 80,84 ---- <id>neuclear-commons</id> <name>neuclear-commons</name> ! <version>0.5</version> <properties> <war.bundle>true</war.bundle> *************** *** 154,171 **** <url>http://java.sun.com/products/javabeans/glasgow/jaf.html</url> </dependency> ! <dependency> ! <id>picocontainer</id> ! <version>1.0-beta-1</version> ! <properties> ! <war.bundle>true</war.bundle> ! </properties> ! </dependency> ! <dependency> ! <id>nanocontainer</id> ! <version>1.0-alpha-PRESPLIT-1</version> ! <properties> ! <war.bundle>true</war.bundle> ! </properties> ! </dependency> </dependencies> <build> --- 154,171 ---- <url>http://java.sun.com/products/javabeans/glasgow/jaf.html</url> </dependency> ! <!-- <dependency> ! <id>picocontainer</id> ! <version>1.0-beta-1</version> ! <properties> ! <war.bundle>true</war.bundle> ! </properties> ! </dependency> ! <dependency> ! <id>nanocontainer</id> ! <version>1.0-alpha-PRESPLIT-1</version> ! <properties> ! <war.bundle>true</war.bundle> ! </properties> ! </dependency>--> </dependencies> <build> |
|
From: <pe...@us...> - 2003-12-10 23:58:56
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv1921/src/java/org/neuclear/id
Modified Files:
Identity.java InvalidNamedObject.java NSTools.java Named.java
NamedObjectReader.java SignatureRequest.java
SignedNamedCore.java SignedNamedObject.java SignedObject.java
Log Message:
Did some cleaning up in the builders
Fixed some stuff in IdentityCreator
New maven goal to create executable jarapp
We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
Will release shortly.
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** Identity.java 21 Nov 2003 04:45:13 -0000 1.22
--- Identity.java 10 Dec 2003 23:58:51 -0000 1.23
***************
*** 2,5 ****
--- 2,12 ----
* $Id$
* $Log$
+ * Revision 1.23 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.22 2003/11/21 04:45:13 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 26,30 ****
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further send on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 33,37 ----
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further receive on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 155,159 ****
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
* The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
! * The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
*
--- 162,166 ----
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
* The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
! * The Identity object also has a new method receive() which allows one to receive a named object to the Identity's
* default receiver.
*
***************
*** 336,344 ****
}
! public SignedNamedObject send(final SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(receiver))
return Sender.quickSend(receiver, obj);
else
! throw new NeuClearException("Cant send object, " + getName() + " doesnt have a registered Receiver");
}
--- 343,351 ----
}
! public final SignedNamedObject receive(final SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(receiver))
return Sender.quickSend(receiver, obj);
else
! throw new NeuClearException("Cant receive object, " + getName() + " doesnt have a registered Receiver");
}
Index: InvalidNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/InvalidNamedObject.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** InvalidNamedObject.java 21 Nov 2003 04:45:13 -0000 1.2
--- InvalidNamedObject.java 10 Dec 2003 23:58:51 -0000 1.3
***************
*** 2,5 ****
--- 2,12 ----
* $Id$
* $Log$
+ * Revision 1.3 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.2 2003/11/21 04:45:13 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 51,55 ****
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
* The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
! * The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
*
--- 58,62 ----
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
* The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
! * The Identity object also has a new method receive() which allows one to receive a named object to the Identity's
* default receiver.
*
Index: NSTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NSTools.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** NSTools.java 8 Dec 2003 19:32:32 -0000 1.17
--- NSTools.java 10 Dec 2003 23:58:51 -0000 1.18
***************
*** 2,5 ****
--- 2,12 ----
* $Id$
* $Log$
+ * Revision 1.18 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.17 2003/12/08 19:32:32 pelle
* Added support for the http scheme into ID. See http://neuclear.org/archives/000195.html
***************
*** 91,95 ****
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
* The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
! * The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
*
--- 98,102 ----
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
* The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
! * The Identity object also has a new method receive() which allows one to receive a named object to the Identity's
* default receiver.
*
***************
*** 239,243 ****
* @throws NeuClearException if name is invalid
*/
! public static String getParentNSURI(final String uri) throws NeuClearException {
if (!isValidName(uri))
throw new InvalidNamedObject("Invalid Neu ID: " + uri);
--- 246,250 ----
* @throws NeuClearException if name is invalid
*/
! public static String getSignatoryURI(final String uri) throws NeuClearException {
if (!isValidName(uri))
throw new InvalidNamedObject("Invalid Neu ID: " + uri);
***************
*** 261,264 ****
--- 268,299 ----
/**
+ * Returns the last part of a NEU URI.
+ *
+ * @param uri a valid NEU Name
+ * @return Parent URI or null if name is the root
+ * @throws NeuClearException if name is invalid
+ */
+ public static String getLocalName(final String uri) throws NeuClearException {
+ if (!isValidName(uri))
+ throw new InvalidNamedObject("Invalid Neu ID: " + uri);
+ final int bang = uri.indexOf('!');
+
+ // We hava a Transaction ID. We always return its signer
+ if (bang > -1)
+ return uri.substring(bang + 1);
+
+ final int slash = uri.lastIndexOf('/');
+ final int at = uri.indexOf('@');
+ // We have a User ID
+ if (slash < at)
+ return uri.substring(slash + 1, at);
+ // We have a top level
+ if (uri.charAt(slash - 1) == '/')
+ return uri.substring(slash + 1);
+ //Regular
+ return uri.substring(slash + 1);
+ }
+
+ /**
* Creates a Globally Unique ID using the following algorithm:
* <ol><li>Take given Identity URI</li>
***************
*** 326,339 ****
throw new InvalidNamedObject("Invalid NEU ID: " + name);
}
/**
* Checks to see if the following name should be resolved using the HTTP Resolving Scheme
! * @param name
! * @return
*/
! public static String isHttpScheme(final String name){
if (!Utility.isEmpty(name)) {
final Matcher matcher = HTTP_SCHEME.matcher(name);
if (matcher.matches())
! return "http://"+matcher.group(2)+"/_NEUID"; //TODO switch to https
}
return null;
--- 361,376 ----
throw new InvalidNamedObject("Invalid NEU ID: " + name);
}
+
/**
* Checks to see if the following name should be resolved using the HTTP Resolving Scheme
! *
! * @param name
! * @return
*/
! public static String isHttpScheme(final String name) {
if (!Utility.isEmpty(name)) {
final Matcher matcher = HTTP_SCHEME.matcher(name);
if (matcher.matches())
! return "http://" + matcher.group(2) + "/_NEUID"; //TODO switch to https
}
return null;
***************
*** 341,353 ****
}
! private static final String HTTP_SCHEME_EX="^neu:(neuid:)?\\/\\/(([\\w-]+\\.)+[\\w-]+)$";
! private static final Pattern HTTP_SCHEME=Pattern.compile(HTTP_SCHEME_EX);
! public static final String NEUID_URI = "http://neuclear.org/neu/neuid";
public static final Namespace NS_NEUID = DocumentHelper.createNamespace("neuid", NEUID_URI);
public static final String NEUID_PREFIX = "neuid:";
! public static final String SCHEME_PREFIX = "([\\w]{1,6}:)?";
private static final String VALID_TOKEN = "[\\w][\\w.-]*";
private static final String VALID_USER_TOKEN = "(([\\w][\\w.-]*)@)?";
--- 378,390 ----
}
! private static final String HTTP_SCHEME_EX = "^neu:(neuid:)?\\/\\/(([\\w-]+\\.)+[\\w-]+)$";
! private static final Pattern HTTP_SCHEME = Pattern.compile(HTTP_SCHEME_EX);
! private static final String NEUID_URI = "http://neuclear.org/neu/neuid";
public static final Namespace NS_NEUID = DocumentHelper.createNamespace("neuid", NEUID_URI);
public static final String NEUID_PREFIX = "neuid:";
! private static final String SCHEME_PREFIX = "([\\w]{1,6}:)?";
private static final String VALID_TOKEN = "[\\w][\\w.-]*";
private static final String VALID_USER_TOKEN = "(([\\w][\\w.-]*)@)?";
Index: Named.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Named.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Named.java 21 Oct 2003 22:31:13 -0000 1.3
--- Named.java 10 Dec 2003 23:58:51 -0000 1.4
***************
*** 23,26 ****
--- 23,33 ----
$Id$
$Log$
+ Revision 1.4 2003/12/10 23:58:51 pelle
+ Did some cleaning up in the builders
+ Fixed some stuff in IdentityCreator
+ New maven goal to create executable jarapp
+ We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ Will release shortly.
+
Revision 1.3 2003/10/21 22:31:13 pelle
Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense.
***************
*** 43,47 ****
/**
- *
* User: pelleb
* Date: Sep 23, 2003
--- 50,53 ----
***************
*** 49,54 ****
*/
public interface Named {
! String getName() ;
! String getLocalName();
}
--- 55,60 ----
*/
public interface Named {
! String getName();
! String getLocalName() throws NeuClearException;
}
Index: NamedObjectReader.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NamedObjectReader.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** NamedObjectReader.java 20 Nov 2003 16:01:25 -0000 1.5
--- NamedObjectReader.java 10 Dec 2003 23:58:51 -0000 1.6
***************
*** 5,10 ****
import org.neuclear.xml.xmlsec.XMLSecurityException;
- import java.sql.Timestamp;
-
/*
NeuClear Distributed Transaction Clearing Platform
--- 5,8 ----
***************
*** 27,30 ****
--- 25,35 ----
$Id$
$Log$
+ Revision 1.6 2003/12/10 23:58:51 pelle
+ Did some cleaning up in the builders
+ Fixed some stuff in IdentityCreator
+ New maven goal to create executable jarapp
+ We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ Will release shortly.
+
Revision 1.5 2003/11/20 16:01:25 pelle
Did a security review of the basic Verification process and needed to make changes.
***************
*** 39,43 ****
Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
SignedNamedObject now contains the full xml which is returned with getEncoded()
! This means that it is now possible to further send on or process a SignedNamedObject, leaving
NamedObjectBuilder for its original purposes of purely generating new Contracts.
NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 44,48 ----
Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
SignedNamedObject now contains the full xml which is returned with getEncoded()
! This means that it is now possible to further receive on or process a SignedNamedObject, leaving
NamedObjectBuilder for its original purposes of purely generating new Contracts.
NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 79,82 ****
* @return
*/
! public SignedNamedObject read(SignedNamedCore core,Element elem) throws NeuClearException, XMLSecurityException;
}
--- 84,87 ----
* @return
*/
! public SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException;
}
Index: SignatureRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignatureRequest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** SignatureRequest.java 22 Nov 2003 00:23:47 -0000 1.8
--- SignatureRequest.java 10 Dec 2003 23:58:51 -0000 1.9
***************
*** 28,31 ****
--- 28,38 ----
$Id$
$Log$
+ Revision 1.9 2003/12/10 23:58:51 pelle
+ Did some cleaning up in the builders
+ Fixed some stuff in IdentityCreator
+ New maven goal to create executable jarapp
+ We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ Will release shortly.
+
Revision 1.8 2003/11/22 00:23:47 pelle
All unit tests in commons, id and xmlsec now work.
***************
*** 55,59 ****
Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
SignedNamedObject now contains the full xml which is returned with getEncoded()
! This means that it is now possible to further send on or process a SignedNamedObject, leaving
NamedObjectBuilder for its original purposes of purely generating new Contracts.
NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 62,66 ----
Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
SignedNamedObject now contains the full xml which is returned with getEncoded()
! This means that it is now possible to further receive on or process a SignedNamedObject, leaving
NamedObjectBuilder for its original purposes of purely generating new Contracts.
NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 72,76 ****
Revision 1.1 2003/11/06 20:01:54 pelle
Implemented AuthenticationTicket and friends to comply with the newer model.
! Created SignatureRequest and friends to send unsigned NamedObjectBuilders to interactive signing services.
*/
--- 79,83 ----
Revision 1.1 2003/11/06 20:01:54 pelle
Implemented AuthenticationTicket and friends to comply with the newer model.
! Created SignatureRequest and friends to receive unsigned NamedObjectBuilders to interactive signing services.
*/
Index: SignedNamedCore.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedCore.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SignedNamedCore.java 8 Dec 2003 19:32:32 -0000 1.4
--- SignedNamedCore.java 10 Dec 2003 23:58:51 -0000 1.5
***************
*** 2,5 ****
--- 2,12 ----
* $Id$
* $Log$
+ * Revision 1.5 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.4 2003/12/08 19:32:32 pelle
* Added support for the http scheme into ID. See http://neuclear.org/archives/000195.html
***************
*** 26,30 ****
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further send on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 33,37 ----
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further receive on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 101,105 ****
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
* The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
! * The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
*
--- 108,112 ----
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
* The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
! * The Identity object also has a new method receive() which allows one to receive a named object to the Identity's
* default receiver.
*
***************
*** 206,225 ****
package org.neuclear.id;
import org.dom4j.Element;
import org.dom4j.QName;
- import org.dom4j.DocumentHelper;
import org.neuclear.commons.NeuClearException;
- import org.neuclear.commons.time.TimeTools;
import org.neuclear.commons.crypto.CryptoTools;
import org.neuclear.xml.XMLException;
- import org.neuclear.xml.XMLTools;
- import org.neuclear.xml.xmlsec.XMLSecTools;
import org.neuclear.xml.xmlsec.KeyInfo;
! import org.neuclear.id.resolver.NSResolver;
! import org.neuclear.id.verifier.VerifyingReader;
- import java.sql.Timestamp;
- import java.io.InputStream;
import java.security.PublicKey;
/**
--- 213,229 ----
package org.neuclear.id;
+ import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.QName;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.CryptoTools;
+ import org.neuclear.commons.time.TimeTools;
+ import org.neuclear.id.resolver.NSResolver;
import org.neuclear.xml.XMLException;
import org.neuclear.xml.xmlsec.KeyInfo;
! import org.neuclear.xml.xmlsec.XMLSecTools;
import java.security.PublicKey;
+ import java.sql.Timestamp;
/**
***************
*** 244,250 ****
* @see org.neuclear.commons.crypto.signers.Signer
*/
! public final class SignedNamedCore {
! private SignedNamedCore(final String name, final Identity signer, final Timestamp timestamp, final String encoded) {
this.name = name;
this.signer = signer;
--- 248,254 ----
* @see org.neuclear.commons.crypto.signers.Signer
*/
! public final class SignedNamedCore {
! private SignedNamedCore(final String name, final Identity signer, final Timestamp timestamp, final String encoded) {
this.name = name;
this.signer = signer;
***************
*** 255,278 ****
/**
* Used to read and authenticate a SignedNamedCore.
! * @param elem
! * @return
! * @throws XMLException
! * @throws NeuClearException
*/
public final static SignedNamedCore read(final Element elem) throws XMLException, NeuClearException {
final String name = NSTools.normalizeNameURI(elem.attributeValue(getNameAttrQName()));
! final String signatoryName = NSTools.getParentNSURI(name);
final Identity signatory = NSResolver.resolveIdentity(signatoryName);
PublicKey publicKey = signatory.getPublicKey();
! if (NSTools.isHttpScheme(name)!=null){
// We have a self signed http authenticated certificate and need to extract
// the PublicKey from the xml
final Element allowElement = elem.element(DocumentHelper.createQName("allow", NSTools.NS_NEUID));
final KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo")));
! publicKey= ki.getPublicKey();
}
if (XMLSecTools.verifySignature(elem, publicKey)) {
final Timestamp timestamp = TimeTools.parseTimeStamp(elem.attributeValue("timestamp"));
! return new SignedNamedCore( name, signatory, timestamp,new String(XMLSecTools.canonicalize(elem)));
} else
throw new InvalidNamedObject(name + " isnt valid");
--- 259,283 ----
/**
* Used to read and authenticate a SignedNamedCore.
! *
! * @param elem
! * @return
! * @throws XMLException
! * @throws NeuClearException
*/
public final static SignedNamedCore read(final Element elem) throws XMLException, NeuClearException {
final String name = NSTools.normalizeNameURI(elem.attributeValue(getNameAttrQName()));
! final String signatoryName = NSTools.getSignatoryURI(name);
final Identity signatory = NSResolver.resolveIdentity(signatoryName);
PublicKey publicKey = signatory.getPublicKey();
! if (NSTools.isHttpScheme(name) != null) {
// We have a self signed http authenticated certificate and need to extract
// the PublicKey from the xml
final Element allowElement = elem.element(DocumentHelper.createQName("allow", NSTools.NS_NEUID));
final KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo")));
! publicKey = ki.getPublicKey();
}
if (XMLSecTools.verifySignature(elem, publicKey)) {
final Timestamp timestamp = TimeTools.parseTimeStamp(elem.attributeValue("timestamp"));
! return new SignedNamedCore(name, signatory, timestamp, new String(XMLSecTools.canonicalize(elem)));
} else
throw new InvalidNamedObject(name + " isnt valid");
***************
*** 281,293 ****
/**
* Solely used by RootIdentity
! * @return
*/
! final static SignedNamedCore createRootCore() {
! return new SignedNamedCore("neu://",null,new Timestamp(0),null);
}
private static QName getNameAttrQName() {
return DocumentHelper.createQName("name", NSTools.NS_NEUID);
}
/**
* The full name (URI) of an object
--- 286,301 ----
/**
* Solely used by RootIdentity
! *
! * @return
*/
! final static SignedNamedCore createRootCore() {
! return new SignedNamedCore("neu://", null, new Timestamp(0), null);
}
+
private static QName getNameAttrQName() {
return DocumentHelper.createQName("name", NSTools.NS_NEUID);
}
+
/**
* The full name (URI) of an object
***************
*** 353,357 ****
private final long timestamp;
private final String encoded;
-
--- 361,364 ----
Index: SignedNamedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedObject.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** SignedNamedObject.java 21 Nov 2003 04:45:13 -0000 1.12
--- SignedNamedObject.java 10 Dec 2003 23:58:51 -0000 1.13
***************
*** 2,5 ****
--- 2,12 ----
* $Id$
* $Log$
+ * Revision 1.13 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.12 2003/11/21 04:45:13 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 20,24 ****
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further send on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 27,31 ----
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further receive on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 95,99 ****
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
* The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
! * The Identity object also has a new method send() which allows one to send a named object to the Identity's
* default receiver.
*
--- 102,106 ----
* The email sender works. The LogSender and the SoapSender should work but havent been tested yet.
* The SignedNamedObject has a new log() method that logs it's contents at it's parent Identity's logger.
! * The Identity object also has a new method receive() which allows one to receive a named object to the Identity's
* default receiver.
*
***************
*** 202,206 ****
import org.dom4j.Element;
import org.neuclear.commons.NeuClearException;
- import org.neuclear.commons.crypto.CryptoTools;
import org.neuclear.xml.xmlsec.XMLSecurityException;
--- 209,212 ----
***************
*** 231,235 ****
protected SignedNamedObject(final SignedNamedCore core) throws NeuClearException {
! this.core=core;
}
--- 237,241 ----
protected SignedNamedObject(final SignedNamedCore core) throws NeuClearException {
! this.core = core;
}
***************
*** 291,294 ****
--- 297,318 ----
}
+ /**
+ * Logs this object to the signers logging service
+ *
+ * @throws NeuClearException
+ */
+ public void log() throws NeuClearException {
+ getSignatory().log(this);
+ }
+
+ /**
+ * Sends this object to its signers default receiver service
+ *
+ * @throws NeuClearException
+ */
+ public void send() throws NeuClearException {
+ getSignatory().receive(this);
+ }
+
private final SignedNamedCore core;
***************
*** 296,302 ****
/**
* Read object from Element and fill in its details
! *
! * @param elem
! * @return
*/
public SignedNamedObject read(final SignedNamedCore core, final Element elem) throws NeuClearException, XMLSecurityException {
--- 320,326 ----
/**
* Read object from Element and fill in its details
! *
! * @param elem
! * @return
*/
public SignedNamedObject read(final SignedNamedCore core, final Element elem) throws NeuClearException, XMLSecurityException {
Index: SignedObject.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedObject.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SignedObject.java 19 Nov 2003 23:33:59 -0000 1.3
--- SignedObject.java 10 Dec 2003 23:58:51 -0000 1.4
***************
*** 1,9 ****
/* $Id$
* $Log$
* Revision 1.3 2003/11/19 23:33:59 pelle
* Signers now can generatekeys via the generateKey() method.
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further send on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 1,16 ----
/* $Id$
* $Log$
+ * Revision 1.4 2003/12/10 23:58:51 pelle
+ * Did some cleaning up in the builders
+ * Fixed some stuff in IdentityCreator
+ * New maven goal to create executable jarapp
+ * We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ * Will release shortly.
+ *
* Revision 1.3 2003/11/19 23:33:59 pelle
* Signers now can generatekeys via the generateKey() method.
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
! * This means that it is now possible to further receive on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
***************
*** 85,88 ****
--- 92,96 ----
* SignedObject provides an interface to the data of an object that was signed
* AND verified.
+ *
* @author pelleb
* @version $Revision$
|
|
From: <pe...@us...> - 2003-12-10 23:58:56
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store
In directory sc8-pr-cvs1:/tmp/cvs-serv1921/src/test/org/neuclear/store
Modified Files:
AbstractStoreTest.java
Log Message:
Did some cleaning up in the builders
Fixed some stuff in IdentityCreator
New maven goal to create executable jarapp
We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
Will release shortly.
Index: AbstractStoreTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store/AbstractStoreTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** AbstractStoreTest.java 21 Nov 2003 04:45:17 -0000 1.14
--- AbstractStoreTest.java 10 Dec 2003 23:58:52 -0000 1.15
***************
*** 2,5 ****
--- 2,12 ----
$Id$
$Log$
+ Revision 1.15 2003/12/10 23:58:52 pelle
+ Did some cleaning up in the builders
+ Fixed some stuff in IdentityCreator
+ New maven goal to create executable jarapp
+ We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
+ Will release shortly.
+
Revision 1.14 2003/11/21 04:45:17 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 12,16 ****
Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
SignedNamedObject now contains the full xml which is returned with getEncoded()
! This means that it is now possible to further send on or process a SignedNamedObject, leaving
NamedObjectBuilder for its original purposes of purely generating new Contracts.
NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
--- 19,23 ----
Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
SignedNamedObject now contains the full xml which is returned with getEncoded()
! This means that it is now possible to further receive on or process a SignedNamedObject, leaving
NamedObjectBuilder for its original purposes of purely generating new Contracts.
NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
|