You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(119) |
Oct
(111) |
Nov
(238) |
Dec
(395) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(239) |
Feb
(59) |
Mar
(354) |
Apr
(489) |
May
(23) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(5) |
Jun
(2) |
Jul
|
Aug
|
Sep
(3) |
Oct
(14) |
Nov
(17) |
Dec
(9) |
| 2007 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(7) |
May
(3) |
Jun
(6) |
Jul
(4) |
Aug
(3) |
Sep
(15) |
Oct
(13) |
Nov
(35) |
Dec
(40) |
| 2009 |
Jan
(19) |
Feb
(21) |
Mar
(16) |
Apr
(18) |
May
(36) |
Jun
(20) |
Jul
(32) |
Aug
(11) |
Sep
(3) |
Oct
(2) |
Nov
(2) |
Dec
(13) |
| 2010 |
Jan
(5) |
Feb
(5) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(3) |
| 2012 |
Jan
(3) |
Feb
(3) |
Mar
(1) |
Apr
(4) |
May
(8) |
Jun
(4) |
Jul
(9) |
Aug
(2) |
Sep
(8) |
Oct
(3) |
Nov
(8) |
Dec
(4) |
| 2013 |
Jan
(2) |
Feb
(1) |
Mar
(5) |
Apr
(6) |
May
(10) |
Jun
(5) |
Jul
(6) |
Aug
(7) |
Sep
(5) |
Oct
(2) |
Nov
(4) |
Dec
(4) |
| 2014 |
Jan
(13) |
Feb
(4) |
Mar
(7) |
Apr
(9) |
May
(20) |
Jun
(13) |
Jul
(10) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(2) |
Dec
(2) |
| 2015 |
Jan
(3) |
Feb
(3) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(3) |
Nov
(4) |
Dec
(2) |
| 2017 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <pe...@us...> - 2003-11-20 23:42:27
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/commandline
In directory sc8-pr-cvs1:/tmp/cvs-serv31294/src/java/org/neuclear/signers/commandline
Added Files:
BuildAllTopLevel.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
--- NEW FILE: BuildAllTopLevel.java ---
package org.neuclear.signers.commandline;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.passphraseagents.GuiDialogAgent;
import org.neuclear.commons.crypto.signers.*;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.builders.IdentityBuilder;
import org.neuclear.store.FileStore;
import org.neuclear.store.Store;
import org.neuclear.xml.XMLException;
import java.io.FileNotFoundException;
import java.security.GeneralSecurityException;
/*
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: BuildAllTopLevel.java,v 1.1 2003/11/20 23:42:24 pelle Exp $
$Log: BuildAllTopLevel.java,v $
Revision 1.1 2003/11/20 23:42:24 pelle
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
*/
/**
* User: pelleb
* Date: Nov 20, 2003
* Time: 3:26:45 PM
*/
public class BuildAllTopLevel {
public static SignedNamedObject createIdentities(String name, Signer signer, PublicKeySource pubsource) throws NeuClearException, XMLException {
IdentityBuilder id = new IdentityBuilder(
name,
pubsource.getPublicKey(name),
"http://repository.neuclear.org",
"http://users.neuclear.org:8080/Signer",
"http://logger.neuclear.org",
"mailto:pe...@ne...");
System.out.println("Signing: " + name);
return id.sign(signer);
}
public static void main(String args[]) {
try {
JCESigner rootsig = new DefaultSigner(new GuiDialogAgent());
JCESigner testsig = new TestCaseSigner();
Store store = new FileStore("target/testdata/repository");
store.receive(createIdentities("neu://", rootsig, rootsig));
store.receive(createIdentities("neu://test", rootsig, testsig));
store.receive(createIdentities("neu://pelle", rootsig, rootsig));
store.receive(createIdentities("neu://verax", rootsig, rootsig));
} catch (NeuClearException e) {
e.printStackTrace();
} catch (GeneralSecurityException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (XMLException e) {
e.printStackTrace();
}
}
}
|
|
From: <pe...@us...> - 2003-11-20 23:42:27
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv31294/src/java/org/neuclear/id/builders
Modified Files:
NamedObjectBuilder.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: NamedObjectBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/builders/NamedObjectBuilder.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** NamedObjectBuilder.java 19 Nov 2003 23:33:58 -0000 1.9
--- NamedObjectBuilder.java 20 Nov 2003 23:42:24 -0000 1.10
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.10 2003/11/20 23:42:24 pelle
+ * Getting all the tests to work in id
+ * Removing usage of BC in CryptoTools as it was causing issues.
+ * First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
+ * writing SQL. (Yipee)
+ *
* Revision 1.9 2003/11/19 23:33:58 pelle
* Signers now can generatekeys via the generateKey() method.
***************
*** 166,170 ****
import org.neuclear.commons.crypto.signers.Signer;
import org.neuclear.commons.time.TimeTools;
! import org.neuclear.id.*;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.id.verifier.VerifyingReader;
--- 172,179 ----
import org.neuclear.commons.crypto.signers.Signer;
import org.neuclear.commons.time.TimeTools;
! import org.neuclear.id.Identity;
! import org.neuclear.id.NSTools;
! import org.neuclear.id.Named;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.id.verifier.VerifyingReader;
***************
*** 174,178 ****
import org.neuclear.xml.xmlsec.XMLSecurityException;
- import java.io.ByteArrayInputStream;
import java.sql.Timestamp;
import java.util.Iterator;
--- 183,186 ----
***************
*** 225,235 ****
final public SignedNamedObject sign(Signer signer) throws NeuClearException, XMLException {
sign(getParent().getName(), signer);
! return verify();
! }
!
! private final SignedNamedObject verify() throws NeuClearException, XMLException {
! if (!isSigned())
! throw new InvalidNamedObject("Invalid: " + this.getName());
! return VerifyingReader.getInstance().read(new ByteArrayInputStream(canonicalize()));
}
--- 233,237 ----
final public SignedNamedObject sign(Signer signer) throws NeuClearException, XMLException {
sign(getParent().getName(), signer);
! return VerifyingReader.getInstance().read(getElement());
}
***************
*** 240,248 ****
*/
public String getName() {
! try {
! return NSTools.normalizeNameURI(getElement().attributeValue(getNameAttrQName()));
! } catch (NeuClearException e) {
! return "Unknown";
! }
}
--- 242,246 ----
*/
public String getName() {
! return getElement().attributeValue(getNameAttrQName());
}
|
|
From: <pe...@us...> - 2003-11-20 23:42:01
|
Update of /cvsroot/neuclear/neuclear-xmlsig In directory sc8-pr-cvs1:/tmp/cvs-serv31228 Modified Files: project.properties Log Message: Getting all the tests to work in id Removing usage of BC in CryptoTools as it was causing issues. First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without writing SQL. (Yipee) Index: project.properties =================================================================== RCS file: /cvsroot/neuclear/neuclear-xmlsig/project.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** project.properties 19 Nov 2003 23:33:17 -0000 1.3 --- project.properties 20 Nov 2003 23:41:58 -0000 1.4 *************** *** 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-11-20 23:42:01
|
Update of /cvsroot/neuclear/neuclear-xmlsig/src/test/org/neuclear/xml/xmlsec
In directory sc8-pr-cvs1:/tmp/cvs-serv31228/src/test/org/neuclear/xml/xmlsec
Modified Files:
SimpleXMLSigTest.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: SimpleXMLSigTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-xmlsig/src/test/org/neuclear/xml/xmlsec/SimpleXMLSigTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SimpleXMLSigTest.java 18 Nov 2003 23:35:18 -0000 1.3
--- SimpleXMLSigTest.java 20 Nov 2003 23:41:58 -0000 1.4
***************
*** 22,28 ****
* $Id$
* $Log$
* Revision 1.3 2003/11/18 23:35:18 pelle
* Payment Web Application is getting there.
! *
* Revision 1.2 2003/11/11 21:18:08 pelle
* Further vital reshuffling.
--- 22,34 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/11/20 23:41:58 pelle
+ * Getting all the tests to work in id
+ * Removing usage of BC in CryptoTools as it was causing issues.
+ * First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
+ * writing SQL. (Yipee)
+ *
* Revision 1.3 2003/11/18 23:35:18 pelle
* Payment Web Application is getting there.
! * <p/>
* Revision 1.2 2003/11/11 21:18:08 pelle
* Further vital reshuffling.
***************
*** 93,96 ****
--- 99,103 ----
signer = JunitTools.getTestRSAKey();
dsaSigner = JunitTools.getTestDSAKey();
+ new File("target/testdata/homegrown").mkdirs();
}
***************
*** 108,112 ****
Document doc = DocumentHelper.parseText(TESTXML);
XMLSignature sig = new XMLSignature(signer, doc.getRootElement(), "http://testsigs", Reference.XMLSIGTYPE_ENVELOPING);
! File outputFile = new File("target/src/testdata/homegrown/signature-enveloping-rsa.xml");
XMLTools.writeFile(outputFile, sig.getElement());
--- 115,119 ----
Document doc = DocumentHelper.parseText(TESTXML);
XMLSignature sig = new XMLSignature(signer, doc.getRootElement(), "http://testsigs", Reference.XMLSIGTYPE_ENVELOPING);
! File outputFile = new File("target/testdata/homegrown/signature-enveloping-rsa.xml");
XMLTools.writeFile(outputFile, sig.getElement());
***************
*** 118,122 ****
Document doc = DocumentHelper.parseText(TESTXML);
XMLSignature sig = new XMLSignature(dsaSigner, doc.getRootElement(), "http://testsigs", Reference.XMLSIGTYPE_ENVELOPING);
! File outputFile = new File("target/src/testdata/homegrown/signature-enveloping-dsa.xml");
XMLTools.writeFile(outputFile, sig.getElement());
--- 125,129 ----
Document doc = DocumentHelper.parseText(TESTXML);
XMLSignature sig = new XMLSignature(dsaSigner, doc.getRootElement(), "http://testsigs", Reference.XMLSIGTYPE_ENVELOPING);
! File outputFile = new File("target/testdata/homegrown/signature-enveloping-dsa.xml");
XMLTools.writeFile(outputFile, sig.getElement());
***************
*** 131,135 ****
XMLSignature sig = new XMLSignature(dsaSigner, doc.getRootElement(), "http://testDSAsigs");
! File outputFile = new File("target/src/testdata/homegrown/signature-enveloped-dsa.xml");
XMLTools.writeFile(outputFile, doc);
--- 138,142 ----
XMLSignature sig = new XMLSignature(dsaSigner, doc.getRootElement(), "http://testDSAsigs");
! File outputFile = new File("target/testdata/homegrown/signature-enveloped-dsa.xml");
XMLTools.writeFile(outputFile, doc);
***************
*** 141,145 ****
Document doc = DocumentHelper.parseText(TESTXML);
XMLSecTools.signElement("http://testsigs", doc.getRootElement(), signer);
! File outputFile = new File("target/src/testdata/homegrown/signature-enveloped-rsa-quick.xml");
XMLTools.writeFile(outputFile, doc);
--- 148,152 ----
Document doc = DocumentHelper.parseText(TESTXML);
XMLSecTools.signElement("http://testsigs", doc.getRootElement(), signer);
! File outputFile = new File("target/testdata/homegrown/signature-enveloped-rsa-quick.xml");
XMLTools.writeFile(outputFile, doc);
|
|
From: <pe...@us...> - 2003-11-20 23:41:39
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/test
In directory sc8-pr-cvs1:/tmp/cvs-serv31139/src/java/org/neuclear/commons/test
Modified Files:
JunitTools.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: JunitTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/test/JunitTools.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** JunitTools.java 11 Nov 2003 21:17:48 -0000 1.1
--- JunitTools.java 20 Nov 2003 23:41:36 -0000 1.2
***************
*** 1,14 ****
package org.neuclear.commons.test;
- import org.neuclear.commons.Utility;
- import org.neuclear.commons.crypto.CryptoTools;
import org.neuclear.commons.crypto.CryptoException;
- import java.security.*;
- import java.security.cert.CertificateException;
- import java.io.FileInputStream;
import java.io.File;
! import java.io.FileNotFoundException;
import java.io.IOException;
/**
--- 1,15 ----
package org.neuclear.commons.test;
import org.neuclear.commons.crypto.CryptoException;
+ import org.neuclear.commons.crypto.CryptoTools;
import java.io.File;
! import java.io.FileInputStream;
import java.io.IOException;
+ import java.security.KeyPair;
+ import java.security.KeyStore;
+ import java.security.KeyStoreException;
+ import java.security.NoSuchAlgorithmException;
+ import java.security.cert.CertificateException;
/**
***************
*** 19,22 ****
--- 20,29 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/11/20 23:41:36 pelle
+ * Getting all the tests to work in id
+ * Removing usage of BC in CryptoTools as it was causing issues.
+ * First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
+ * writing SQL. (Yipee)
+ *
* Revision 1.1 2003/11/11 21:17:48 pelle
* Further vital reshuffling.
***************
*** 24,43 ****
* 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.1 2003/02/21 22:48:18 pelle
* New Test Infrastructure
* Added test keys in src/testdata/keys
* Modified tools to handle these keys
- *
*/
public final class JunitTools {
private static void loadKeys() throws CryptoException {
try {
! // TODO I think the keys are corrupt
! KeyStore ks=KeyStore.getInstance(KeyStore.getDefaultType());
char[] password = "neuclear".toCharArray();
! ks.load(new FileInputStream(new File("src/testdata/keys/testkeys.jks")),password);
! rsakey=CryptoTools.getKeyPair(ks,"rsakey",password);
! dsakey=CryptoTools.getKeyPair(ks,"dsakey",password);
} catch (KeyStoreException e) {
--- 31,49 ----
* 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.
! * <p/>
* Revision 1.1 2003/02/21 22:48:18 pelle
* New Test Infrastructure
* Added test keys in src/testdata/keys
* Modified tools to handle these keys
*/
public final class JunitTools {
private static void loadKeys() throws CryptoException {
try {
!
! KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
char[] password = "neuclear".toCharArray();
! ks.load(new FileInputStream(new File("src/testdata/keys/testkeys.jks")), password);
! rsakey = CryptoTools.getKeyPair(ks, "rsakey", password);
! dsakey = CryptoTools.getKeyPair(ks, "dsakey", password);
} catch (KeyStoreException e) {
***************
*** 55,59 ****
public static KeyPair getTestRSAKey() throws CryptoException {
! if (rsakey==null)
loadKeys();
return rsakey;
--- 61,65 ----
public static KeyPair getTestRSAKey() throws CryptoException {
! if (rsakey == null)
loadKeys();
return rsakey;
***************
*** 61,65 ****
public static KeyPair getTestDSAKey() throws CryptoException {
! if (dsakey==null)
loadKeys();
return dsakey;
--- 67,71 ----
public static KeyPair getTestDSAKey() throws CryptoException {
! if (dsakey == null)
loadKeys();
return dsakey;
|
|
From: <pe...@us...> - 2003-11-20 23:41:39
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto
In directory sc8-pr-cvs1:/tmp/cvs-serv31139/src/java/org/neuclear/commons/crypto
Modified Files:
CryptoTools.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: CryptoTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/crypto/CryptoTools.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CryptoTools.java 19 Nov 2003 23:32:50 -0000 1.3
--- CryptoTools.java 20 Nov 2003 23:41:36 -0000 1.4
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.4 2003/11/20 23:41:36 pelle
+ * Getting all the tests to work in id
+ * Removing usage of BC in CryptoTools as it was causing issues.
+ * First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
+ * writing SQL. (Yipee)
+ *
* Revision 1.3 2003/11/19 23:32:50 pelle
* Signers now can generatekeys via the generateKey() method.
***************
*** 362,368 ****
public static Cipher getCipher(byte key[], boolean doencrypt) throws CryptoException {
try {
! Cipher cipher = Cipher.getInstance("AES", "BC");
KeySpec keyspec = new SecretKeySpec(key, "AES");
! SecretKeyFactory kf = SecretKeyFactory.getInstance("AES", "BC");
Key skey = kf.generateSecret(keyspec);
cipher.init(doencrypt ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE, skey);
--- 368,374 ----
public static Cipher getCipher(byte key[], boolean doencrypt) throws CryptoException {
try {
! Cipher cipher = Cipher.getInstance("AES");
KeySpec keyspec = new SecretKeySpec(key, "AES");
! SecretKeyFactory kf = SecretKeyFactory.getInstance("AES");
Key skey = kf.generateSecret(keyspec);
cipher.init(doencrypt ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE, skey);
***************
*** 376,381 ****
} catch (InvalidKeyException e) {
rethrowException(e);
- } catch (NoSuchProviderException e) {
- rethrowException(e);
}
return null;
--- 382,385 ----
***************
*** 406,414 ****
Signature sig = null;
if (key instanceof RSAPrivateKey)
! sig = Signature.getInstance("SHA1withRSA", "BC"); // Set up signature object.
else if (key instanceof DSAPrivateKey)
! sig = Signature.getInstance("SHA1withDSA", "BC");
else if (key instanceof ECPrivateKey)
! sig = Signature.getInstance("SHA1withECDSA", "BC");
sig.initSign(key); // Initialize with my private signing key.
--- 410,418 ----
Signature sig = null;
if (key instanceof RSAPrivateKey)
! sig = Signature.getInstance("SHA1withRSA"); // Set up signature object.
else if (key instanceof DSAPrivateKey)
! sig = Signature.getInstance("SHA1withDSA");
else if (key instanceof ECPrivateKey)
! sig = Signature.getInstance("SHA1withECDSA");
sig.initSign(key); // Initialize with my private signing key.
***************
*** 420,427 ****
Signature sig = null;
if (pk instanceof DSAPublicKey) {
! sig = Signature.getInstance("SHA1withDSA", "BC"); // Set up signature object.
sigvalue = convertXMLDSIGtoASN1(sigvalue);
} else if (pk instanceof RSAPublicKey) {
! sig = Signature.getInstance("SHA1withRSA", "BC");
}
sig.initVerify(pk); // Initialize with my private signing key.
--- 424,431 ----
Signature sig = null;
if (pk instanceof DSAPublicKey) {
! sig = Signature.getInstance("SHA1withDSA"); // Set up signature object.
sigvalue = convertXMLDSIGtoASN1(sigvalue);
} else if (pk instanceof RSAPublicKey) {
! sig = Signature.getInstance("SHA1withRSA");
}
sig.initVerify(pk); // Initialize with my private signing key.
***************
*** 585,589 ****
public static PublicKey createPK(String mod, String exp) throws CryptoException {
try {
! KeyFactory rsaFactory = KeyFactory.getInstance("RSA", "BC");
RSAPublicKeySpec rsaKeyspec = new RSAPublicKeySpec(new BigInteger(Base64.decode(mod)), new BigInteger(Base64.decode(exp)));
return rsaFactory.generatePublic(rsaKeyspec);
--- 589,593 ----
public static PublicKey createPK(String mod, String exp) throws CryptoException {
try {
! KeyFactory rsaFactory = KeyFactory.getInstance("RSA");
RSAPublicKeySpec rsaKeyspec = new RSAPublicKeySpec(new BigInteger(Base64.decode(mod)), new BigInteger(Base64.decode(exp)));
return rsaFactory.generatePublic(rsaKeyspec);
***************
*** 592,598 ****
throw new CryptoException(e);
} catch (InvalidKeySpecException e) {
- e.printStackTrace(System.err);
- throw new CryptoException(e);
- } catch (NoSuchProviderException e) {
e.printStackTrace(System.err);
throw new CryptoException(e);
--- 596,599 ----
|
|
From: <pe...@us...> - 2003-11-20 23:41:39
|
Update of /cvsroot/neuclear/neuclear-commons
In directory sc8-pr-cvs1:/tmp/cvs-serv31139
Modified Files:
project.xml
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: project.xml
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/project.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** project.xml 19 Nov 2003 14:37:37 -0000 1.11
--- project.xml 20 Nov 2003 23:41:36 -0000 1.12
***************
*** 131,134 ****
--- 131,135 ----
</directory>
<includes>*.jks</includes>
+ <includes>*.xml</includes>
<!-- <targetPath>org/neuclear/commons/crypto/signers</targetPath>-->
</resource>
|
|
From: <pe...@us...> - 2003-11-20 23:41:15
|
Update of /cvsroot/neuclear/neuclear-ledger
In directory sc8-pr-cvs1:/tmp/cvs-serv31051
Modified Files:
project.xml
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: project.xml
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/project.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** project.xml 11 Nov 2003 21:38:12 -0000 1.7
--- project.xml 20 Nov 2003 23:41:12 -0000 1.8
***************
*** 172,185 ****
</unitTest>
! <!-- J A R R E S O U R C E S -->
! <!-- Resources that are packaged up inside the JAR file -->
!
! <jarResources>
! </jarResources>
- <jars>
- <!-- <jar>lib/jce-jdk13-115.jar</jar>
- <jar>lib/dom4j-1.3.jar</jar>-->
- </jars>
</build>
</project>
--- 172,186 ----
</unitTest>
! <resources>
! <resource>
! <directory>
! src/java
! </directory>
! <includes>*.jks</includes>
! <includes>*.xml</includes>
! <!-- <targetPath>org/neuclear/commons/crypto/signers</targetPath>-->
! </resource>
! </resources>
</build>
</project>
|
|
From: <pe...@us...> - 2003-11-20 23:41:15
|
Update of /cvsroot/neuclear/neuclear-ledger/src/test/org/neuclear/ledger/implementations
In directory sc8-pr-cvs1:/tmp/cvs-serv31051/src/test/org/neuclear/ledger/implementations
Added Files:
EntityLedgerTest.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
--- NEW FILE: EntityLedgerTest.java ---
package org.neuclear.ledger.implementations;
import junit.framework.TestCase;
import org.neuclear.commons.time.TimeTools;
import org.ofbiz.core.entity.GenericDelegator;
import org.ofbiz.core.entity.GenericEntityException;
import org.ofbiz.core.entity.GenericValue;
import org.ofbiz.core.util.UtilMisc;
/*
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: EntityLedgerTest.java,v 1.1 2003/11/20 23:41:12 pelle Exp $
$Log: EntityLedgerTest.java,v $
Revision 1.1 2003/11/20 23:41:12 pelle
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
*/
/**
* User: pelleb
* Date: Nov 20, 2003
* Time: 2:20:13 PM
*/
public class EntityLedgerTest extends TestCase {
public void testEntityEngine() throws GenericEntityException {
//Instantiate the delegator.
GenericDelegator delegator = GenericDelegator.getGenericDelegator("default");
assertNotNull("Error creating delegator object", delegator);
GenericValue ledgerValue = delegator.makeValue("Ledger",
UtilMisc.toMap("id", "neu://test/bux",
"title", "Test Ledger",
"date_created", TimeTools.now()));
GenericValue book = delegator.create(ledgerValue);
assertNotNull("Couldn't create Book entity", book);
// Find book by primary key
GenericValue foundBook = delegator.findByPrimaryKey("Ledger",
UtilMisc.toMap("id", "neu://test"));
assertNotNull("Couldn't find Ledger", foundBook);
}
}
|
|
From: <pe...@us...> - 2003-11-20 23:41:15
|
Update of /cvsroot/neuclear/neuclear-ledger/src/java/org/neuclear/ledger/implementations
In directory sc8-pr-cvs1:/tmp/cvs-serv31051/src/java/org/neuclear/ledger/implementations
Added Files:
EntityLedger.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
--- NEW FILE: EntityLedger.java ---
package org.neuclear.ledger.implementations;
import org.ofbiz.core.entity.GenericDelegator;
/*
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: EntityLedger.java,v 1.1 2003/11/20 23:41:12 pelle Exp $
$Log: EntityLedger.java,v $
Revision 1.1 2003/11/20 23:41:12 pelle
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
*/
/**
* User: pelleb
* Date: Nov 20, 2003
* Time: 2:16:21 PM
*/
public class EntityLedger {
public static void main(String args[]) {
System.out.println("Testing Entity Engine");
GenericDelegator delegator = GenericDelegator.getGenericDelegator("default");
}
}
|
|
From: <pe...@us...> - 2003-11-20 23:40:53
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv30972/src/java/org/neuclear/asset/contracts/builders
Modified Files:
AssetBuilder.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: AssetBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/AssetBuilder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AssetBuilder.java 11 Nov 2003 21:17:19 -0000 1.2
--- AssetBuilder.java 20 Nov 2003 23:40:50 -0000 1.3
***************
*** 2,18 ****
import org.dom4j.Element;
- import org.neuclear.id.builders.NamedObjectBuilder;
- import org.neuclear.id.builders.IdentityBuilder;
- import org.neuclear.id.Identity;
- import org.neuclear.id.NSTools;
- import org.neuclear.asset.contracts.TransferGlobals;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.contracts.AssetGlobals;
! import org.neuclear.asset.NegativeTransferException;
! import org.neuclear.asset.InvalidTransferException;
! import org.neuclear.commons.time.TimeTools;
! import org.neuclear.commons.Utility;
! import java.util.Date;
import java.security.PublicKey;
--- 2,16 ----
import org.dom4j.Element;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.contracts.AssetGlobals;
! import org.neuclear.commons.NeuClearException;
! import org.neuclear.commons.crypto.signers.JCESigner;
! import org.neuclear.commons.crypto.signers.TestCaseSigner;
! import org.neuclear.id.builders.IdentityBuilder;
! import org.neuclear.store.FileStore;
! import org.neuclear.store.Store;
! import org.neuclear.xml.XMLException;
! import java.security.GeneralSecurityException;
import java.security.PublicKey;
***************
*** 37,40 ****
--- 35,44 ----
$Id$
$Log$
+ Revision 1.3 2003/11/20 23:40:50 pelle
+ Getting all the tests to work in id
+ Removing usage of BC in CryptoTools as it was causing issues.
+ First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
+ writing SQL. (Yipee)
+
Revision 1.2 2003/11/11 21:17:19 pelle
Further vital reshuffling.
***************
*** 80,87 ****
* Time: 3:13:27 PM
*/
! public abstract class AssetBuilder extends IdentityBuilder {
/**
* Used to create new Assets
! *
* @param name The Name of Identity
* @param allow PublicKey allowed to sign in here
--- 84,91 ----
* Time: 3:13:27 PM
*/
! public class AssetBuilder extends IdentityBuilder {
/**
* Used to create new Assets
! *
* @param name The Name of Identity
* @param allow PublicKey allowed to sign in here
***************
*** 90,103 ****
* @param receiver URL of default receiver for namespace
* @param controller URL of AssetController This should be a http web url
! * @param decimal The amount of decimal points.
! * @param minimum Minimum transaction size
*/
! public AssetBuilder(String name, PublicKey allow, String repository, String signer, String logger, String receiver,String controller, int decimal, double minimum) {
super(AssetGlobals.createQName(AssetGlobals.ASSET_TAGNAME), name, allow, repository, signer, logger, receiver);
! Element elem=getElement();
! AssetGlobals.createAttribute(elem,"controller",controller);
! AssetGlobals.createAttribute(elem,"decimalpoints",Integer.toString(decimal));
! AssetGlobals.createAttribute(elem,"minimumxact",Double.toString(minimum));
}
}
--- 94,136 ----
* @param receiver URL of default receiver for namespace
* @param controller URL of AssetController This should be a http web url
! * @param decimal The amount of decimal points.
! * @param minimum Minimum transaction size
*/
! public AssetBuilder(String name, PublicKey allow, String repository, String signer, String logger, String receiver, String controller, int decimal, double minimum) {
super(AssetGlobals.createQName(AssetGlobals.ASSET_TAGNAME), name, allow, repository, signer, logger, receiver);
! Element elem = getElement();
! AssetGlobals.createAttribute(elem, "controller", controller);
! AssetGlobals.createAttribute(elem, "decimalpoints", Integer.toString(decimal));
! AssetGlobals.createAttribute(elem, "minimumxact", Double.toString(minimum));
!
! }
!
! public static void main(String args[]) {
! try {
! JCESigner signer = new TestCaseSigner();
! String assetname = "neu://test/bux";
! if (args.length > 0)
! assetname = args[0];
+ AssetBuilder assetraw = new AssetBuilder(assetname,
+ signer.getPublicKey(assetname),
+ "http://repository.neuclear.org/",
+ "http://bux.neuclear.org:8080",
+ "http://logger.neuclear.org",
+ "http://bux.neuclear.org:8080",
+ "http://bux.neuclear.org:8080",
+ 2,
+ 0.01
+ );
+ Asset asset = (Asset) assetraw.sign(signer);
+ Store store = new FileStore("target/testdata/assets");
+ store.receive(asset);
+ } catch (GeneralSecurityException e) {
+ e.printStackTrace();
+ } catch (NeuClearException e) {
+ e.printStackTrace();
+ } catch (XMLException e) {
+ e.printStackTrace();
+ }
}
}
|
|
From: <pe...@us...> - 2003-11-20 23:40:53
|
Update of /cvsroot/neuclear/neuclear-pay
In directory sc8-pr-cvs1:/tmp/cvs-serv30972
Modified Files:
project.xml
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: project.xml
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/project.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** project.xml 19 Nov 2003 23:32:21 -0000 1.12
--- project.xml 20 Nov 2003 23:40:50 -0000 1.13
***************
*** 193,205 ****
<!-- J A R R E S O U R C E S -->
- <!-- Resources that are packaged up inside the JAR file -->
-
- <jarResources>
- </jarResources>
- <jars>
- <!-- <jar>lib/jce-jdk13-115.jar</jar>
- <jar>lib/dom4j-1.3.jar</jar>-->
- </jars>
</build>
</project>
--- 193,197 ----
|
|
From: <pe...@us...> - 2003-11-20 19:20:03
|
Update of /cvsroot/neuclear/neuclear-ledger/src/test/org/neuclear/ledger/implementations In directory sc8-pr-cvs1:/tmp/cvs-serv8981/src/test/org/neuclear/ledger/implementations Log Message: Directory /cvsroot/neuclear/neuclear-ledger/src/test/org/neuclear/ledger/implementations added to the repository |
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts
In directory sc8-pr-cvs1:/tmp/cvs-serv5679/src/java/org/neuclear/asset/contracts
Modified Files:
Asset.java AssetTransactionContract.java
CancelHeldTransferReceipt.java CancelHeldTransferRequest.java
CompleteHeldTransferRequest.java HeldTransferReceipt.java
HeldTransferRequest.java TransferContract.java
TransferReceipt.java TransferRequest.java
Log Message:
Updated all the Contracts to use the new security model.
Index: Asset.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/Asset.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Asset.java 19 Nov 2003 23:32:19 -0000 1.7
--- Asset.java 20 Nov 2003 16:01:59 -0000 1.8
***************
*** 5,12 ****
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.Utility;
! import org.neuclear.id.Identity;
! import org.neuclear.id.NSTools;
! import org.neuclear.id.NamedObjectReader;
! import org.neuclear.id.SignedNamedObject;
import org.neuclear.senders.SoapSender;
import org.neuclear.xml.xmlsec.KeyInfo;
--- 5,9 ----
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.Utility;
! import org.neuclear.id.*;
import org.neuclear.senders.SoapSender;
import org.neuclear.xml.xmlsec.KeyInfo;
***************
*** 37,40 ****
--- 34,40 ----
$Id$
$Log$
+ Revision 1.8 2003/11/20 16:01:59 pelle
+ Updated all the Contracts to use the new security model.
+
Revision 1.7 2003/11/19 23:32:19 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 91,103 ****
*/
public class Asset extends Identity {
! private Asset(String name, Identity signatory, Timestamp timestamp, String digest, String repository, String signer, String logger, String receiver, PublicKey pub, String assetController, int decimalpoint, double minimumTransaction) throws NeuClearException {
! super(name, signatory, timestamp, digest, repository, signer, logger, receiver, pub);
this.assetController = assetController;
! this.decimal = decimalpoint;
! this.multiplier = (int) Math.round(Math.pow(10, -decimalpoint));
! this.minimumTransaction = minimumTransaction;
}
! public String getControllerURL() {
return assetController;
}
--- 91,104 ----
*/
public class Asset extends Identity {
! protected Asset(SignedNamedCore core, String repository, String signer, String logger, String receiver, PublicKey pub, String assetController, int decimal, double minimumTransaction) throws NeuClearException {
! super(core, repository, signer, logger, receiver, pub);
this.assetController = assetController;
! this.decimal = decimal;
! this.multiplier = (int) Math.round(Math.pow(10, -decimal));
! this.minimumTransaction=minimumTransaction;
}
!
! public final String getControllerURL() {
return assetController;
}
***************
*** 110,114 ****
* @throws NeuClearException
*/
! public SignedNamedObject send(SignedNamedObject obj) throws NeuClearException {
return SoapSender.quickSend(assetController, obj);
}
--- 111,115 ----
* @throws NeuClearException
*/
! public final SignedNamedObject send(SignedNamedObject obj) throws NeuClearException {
return SoapSender.quickSend(assetController, obj);
}
***************
*** 120,124 ****
* @return
*/
! public boolean isValidAmount(double amount) {
return amount >= minimumTransaction;
}
--- 121,125 ----
* @return
*/
! public final boolean isValidAmount(double amount) {
return amount >= minimumTransaction;
}
***************
*** 130,134 ****
* @return
*/
! public double round(double amount) {
if (amount < minimumTransaction)
return minimumTransaction;
--- 131,135 ----
* @return
*/
! public final double round(double amount) {
if (amount < minimumTransaction)
return minimumTransaction;
***************
*** 146,150 ****
* @return
*/
! public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws NeuClearException, XMLSecurityException {
if (!elem.getNamespace().equals(AssetGlobals.createNameSpace()))
throw new UnsupportedOperationException("");
--- 147,151 ----
* @return
*/
! public final SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException {
if (!elem.getNamespace().equals(AssetGlobals.createNameSpace()))
throw new UnsupportedOperationException("");
***************
*** 163,168 ****
double minimum = (!Utility.isEmpty(min)) ? Double.parseDouble(min) : 0;
! return new Asset(name, signatory, timestamp, digest, repository, signer, logger, receiver, pub, assetController, decimal, minimum);
}
--- 164,170 ----
double minimum = (!Utility.isEmpty(min)) ? Double.parseDouble(min) : 0;
! return new Asset(core, repository, signer, logger, receiver, pub, assetController, decimal, minimum);
}
+
Index: AssetTransactionContract.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/AssetTransactionContract.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AssetTransactionContract.java 19 Nov 2003 23:32:20 -0000 1.4
--- AssetTransactionContract.java 20 Nov 2003 16:01:59 -0000 1.5
***************
*** 8,11 ****
--- 8,12 ----
import org.neuclear.id.NamedObjectReader;
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.id.SignedNamedCore;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.receiver.UnsupportedTransaction;
***************
*** 21,24 ****
--- 22,28 ----
* $Id$
* $Log$
+ * Revision 1.5 2003/11/20 16:01:59 pelle
+ * Updated all the Contracts to use the new security model.
+ *
* Revision 1.4 2003/11/19 23:32:20 pelle
* Signers now can generatekeys via the generateKey() method.
***************
*** 48,56 ****
private final Asset asset;
! public AssetTransactionContract(String name, Identity signer, Timestamp timestamp, String digest, Asset asset) throws NeuClearException {
! super(name, signer, timestamp, digest);
this.asset = asset;
}
public final Asset getAsset() {
return asset;
--- 52,61 ----
private final Asset asset;
! AssetTransactionContract(SignedNamedCore core, Asset asset) throws NeuClearException {
! super(core);
this.asset = asset;
}
+
public final Asset getAsset() {
return asset;
***************
*** 64,68 ****
* @return
*/
! public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws NeuClearException {
if (elem.getNamespaceURI().equals(TransferGlobals.XFER_NSURI))
throw new UnsupportedTransaction(null);
--- 69,73 ----
* @return
*/
! public final SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException {
if (elem.getNamespaceURI().equals(TransferGlobals.XFER_NSURI))
throw new UnsupportedTransaction(null);
***************
*** 71,77 ****
String holdid = elem.attributeValue("holdid");
if (elem.getName().equals(TransferGlobals.CANCEL_TAGNAME))
! return new CancelHeldTransferRequest(name, signatory, timestamp, digest, asset, holdid);
if (elem.getName().equals(TransferGlobals.CANCEL_RCPT_TAGNAME))
! return new CancelHeldTransferReceipt(name, signatory, timestamp, digest, asset, holdid);
double amount = Double.parseDouble(elem.attributeValue("amount"));
--- 76,82 ----
String holdid = elem.attributeValue("holdid");
if (elem.getName().equals(TransferGlobals.CANCEL_TAGNAME))
! return new CancelHeldTransferRequest(core, asset, holdid);
if (elem.getName().equals(TransferGlobals.CANCEL_RCPT_TAGNAME))
! return new CancelHeldTransferReceipt(core, asset, holdid);
double amount = Double.parseDouble(elem.attributeValue("amount"));
***************
*** 80,84 ****
String comment = elem.attributeValue("comment");
if (elem.getName().equals(TransferGlobals.XFER_TAGNAME))
! return new TransferRequest(name, signatory, timestamp, digest, asset, to, amount, valuetime, comment);
Date helduntil = null;
--- 85,89 ----
String comment = elem.attributeValue("comment");
if (elem.getName().equals(TransferGlobals.XFER_TAGNAME))
! return new TransferRequest(core, asset, to, amount, valuetime, comment);
Date helduntil = null;
***************
*** 86,101 ****
helduntil = TimeTools.parseTimeStamp(elem.attributeValue("valuetime"));
if (elem.getName().equals(TransferGlobals.HELD_XFER_TAGNAME))
! return new HeldTransferRequest(name, signatory, timestamp, digest, asset, to, amount, valuetime, comment, helduntil);
Identity from = NSResolver.resolveIdentity(elem.attributeValue("sender"));
String reqid = elem.attributeValue("reqid");
if (elem.getName().equals(TransferGlobals.XFER_RCPT_TAGNAME))
! return new TransferReceipt(name, signatory, timestamp, digest, asset, from, to, reqid, amount, valuetime, comment);
if (elem.getName().equals(TransferGlobals.HELD_XFER_RCPT_TAGNAME))
! return new HeldTransferReceipt(name, signatory, timestamp, digest, asset, from, to, reqid, amount, valuetime, comment, helduntil);
if (elem.getName().equals(TransferGlobals.COMPLETE_TAGNAME))
! return new CompleteHeldTransferRequest(name, signatory, timestamp, digest, asset, from, to, amount, valuetime, comment, holdid);
throw new UnsupportedTransaction(null);
--- 91,106 ----
helduntil = TimeTools.parseTimeStamp(elem.attributeValue("valuetime"));
if (elem.getName().equals(TransferGlobals.HELD_XFER_TAGNAME))
! return new HeldTransferRequest(core, asset, to, amount, valuetime, comment, helduntil);
Identity from = NSResolver.resolveIdentity(elem.attributeValue("sender"));
String reqid = elem.attributeValue("reqid");
if (elem.getName().equals(TransferGlobals.XFER_RCPT_TAGNAME))
! return new TransferReceipt(core, asset, from, to, reqid, amount, valuetime, comment);
if (elem.getName().equals(TransferGlobals.HELD_XFER_RCPT_TAGNAME))
! return new HeldTransferReceipt(core, asset, from, to, reqid, amount, valuetime, comment, helduntil);
if (elem.getName().equals(TransferGlobals.COMPLETE_TAGNAME))
! return new CompleteHeldTransferRequest(core, asset, from, to, amount, valuetime, comment, holdid);
throw new UnsupportedTransaction(null);
Index: CancelHeldTransferReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/CancelHeldTransferReceipt.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CancelHeldTransferReceipt.java 10 Nov 2003 17:42:07 -0000 1.1
--- CancelHeldTransferReceipt.java 20 Nov 2003 16:01:59 -0000 1.2
***************
*** 4,7 ****
--- 4,8 ----
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
***************
*** 13,26 ****
* Time: 5:35:26 PM
*/
! public class CancelHeldTransferReceipt extends AssetTransactionContract{
! CancelHeldTransferReceipt(String name, Identity signer, Timestamp timestamp, String digest,
! Asset asset, String holdid) throws NeuClearException {
! super(name, signer, timestamp, digest,asset);
! this.holdid=holdid;
}
!
! public String getHoldId() {
return holdid;
}
--- 14,25 ----
* Time: 5:35:26 PM
*/
! public final class CancelHeldTransferReceipt extends AssetTransactionContract{
! CancelHeldTransferReceipt(SignedNamedCore core, Asset asset, String holdid) throws NeuClearException {
! super(core, asset);
! this.holdid = holdid;
}
! public final String getHoldId() {
return holdid;
}
Index: CancelHeldTransferRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/CancelHeldTransferRequest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CancelHeldTransferRequest.java 10 Nov 2003 17:42:07 -0000 1.1
--- CancelHeldTransferRequest.java 20 Nov 2003 16:01:59 -0000 1.2
***************
*** 4,7 ****
--- 4,8 ----
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
***************
*** 13,26 ****
* Time: 5:35:26 PM
*/
! public class CancelHeldTransferRequest extends AssetTransactionContract{
! public CancelHeldTransferRequest(String name, Identity signer, Timestamp timestamp, String digest,
! Asset asset, String holdid) throws NeuClearException {
! super(name, signer, timestamp, digest,asset);
! this.holdid=holdid;
}
!
! public String getHoldId() {
return holdid;
}
--- 14,25 ----
* Time: 5:35:26 PM
*/
! public final class CancelHeldTransferRequest extends AssetTransactionContract{
! CancelHeldTransferRequest(SignedNamedCore core, Asset asset, String holdid) throws NeuClearException {
! super(core, asset);
! this.holdid = holdid;
}
! public final String getHoldId() {
return holdid;
}
Index: CompleteHeldTransferRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/CompleteHeldTransferRequest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CompleteHeldTransferRequest.java 10 Nov 2003 17:42:07 -0000 1.1
--- CompleteHeldTransferRequest.java 20 Nov 2003 16:01:59 -0000 1.2
***************
*** 3,6 ****
--- 3,7 ----
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
+ import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
***************
*** 12,30 ****
* Time: 5:35:26 PM
*/
! public class CompleteHeldTransferRequest extends TransferContract {
!
! CompleteHeldTransferRequest(String name, Identity signer, Timestamp timestamp, String digest,
! Asset asset, Identity from,Identity to, double amount, Date valuetime, String comment,String holdid) throws NeuClearException {
! super(name, signer, timestamp, digest, asset, to, amount, valuetime, comment);
! this.from=from;
! this.holdid=holdid;
}
-
public final Identity getFrom() {
return from;
}
! public String getHoldId() {
return holdid;
}
--- 13,28 ----
* Time: 5:35:26 PM
*/
! public final class CompleteHeldTransferRequest extends TransferContract {
! CompleteHeldTransferRequest(SignedNamedCore core, Asset asset, Identity from, Identity to, double amount, Date valuetime, String comment, String holdid) throws NeuClearException {
! super(core, asset, to, amount, valuetime, comment);
! this.from = from;
! this.holdid = holdid;
}
public final Identity getFrom() {
return from;
}
! public final String getHoldId() {
return holdid;
}
Index: HeldTransferReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/HeldTransferReceipt.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HeldTransferReceipt.java 10 Nov 2003 17:42:07 -0000 1.2
--- HeldTransferReceipt.java 20 Nov 2003 16:01:59 -0000 1.3
***************
*** 3,6 ****
--- 3,7 ----
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
+ import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
***************
*** 12,19 ****
* Time: 11:59:36 AM
*/
! public class HeldTransferReceipt extends TransferReceipt implements Held {
! HeldTransferReceipt(String name, Identity signer, Timestamp timestamp, String digest, Asset asset, Identity from, Identity to, String reqid, double amount, Date valuetime, String comment, Date helduntil) throws NeuClearException {
! super(name, signer, timestamp, digest, asset, from, to, reqid, amount, valuetime, comment);
this.helduntil = helduntil;
}
--- 13,20 ----
* Time: 11:59:36 AM
*/
! public final class HeldTransferReceipt extends TransferReceipt implements Held {
! HeldTransferReceipt(SignedNamedCore core, Asset asset, Identity from, Identity to, String reqid, double amount, Date valuetime, String comment, Date helduntil) throws NeuClearException {
! super(core, asset, from, to, reqid, amount, valuetime, comment);
this.helduntil = helduntil;
}
Index: HeldTransferRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/HeldTransferRequest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** HeldTransferRequest.java 8 Nov 2003 01:39:58 -0000 1.1
--- HeldTransferRequest.java 20 Nov 2003 16:01:59 -0000 1.2
***************
*** 3,6 ****
--- 3,7 ----
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
+ import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
***************
*** 12,18 ****
* Time: 12:01:03 PM
*/
! public class HeldTransferRequest extends TransferRequest implements Held {
! public HeldTransferRequest(String name, Identity signer, Timestamp timestamp, String digest, Asset asset, Identity to, double amount, Date valuetime, String comment, Date helduntil) throws NeuClearException {
! super(name, signer, timestamp, digest, asset, to, amount, valuetime, comment);
this.helduntil = helduntil;
}
--- 13,19 ----
* Time: 12:01:03 PM
*/
! public final class HeldTransferRequest extends TransferRequest implements Held {
! HeldTransferRequest(SignedNamedCore core, Asset asset, Identity to, double amount, Date valuetime, String comment, Date helduntil) throws NeuClearException {
! super(core, asset, to, amount, valuetime, comment);
this.helduntil = helduntil;
}
Index: TransferContract.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferContract.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TransferContract.java 11 Nov 2003 21:17:19 -0000 1.3
--- TransferContract.java 20 Nov 2003 16:01:59 -0000 1.4
***************
*** 5,8 ****
--- 5,9 ----
import org.neuclear.id.NamedObjectReader;
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.id.SignedNamedCore;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.receiver.UnsupportedTransaction;
***************
*** 44,54 ****
*/
public abstract class TransferContract extends AssetTransactionContract {
! TransferContract(String name, Identity signer, Timestamp timestamp, String digest,
! Asset asset, Identity to, double amount,Date valuetime,String comment) throws NeuClearException {
! super(name, signer, timestamp, digest,asset);
! this.to = to;
this.amount = amount;
- this.valuetime = valuetime;
this.comment = (comment != null) ? comment : "";
}
--- 45,54 ----
*/
public abstract class TransferContract extends AssetTransactionContract {
! TransferContract(SignedNamedCore core, Asset asset, Identity to, double amount, Date valuetime, String comment) throws NeuClearException {
! super(core, asset);
this.amount = amount;
this.comment = (comment != null) ? comment : "";
+ this.to = to;
+ this.valuetime = valuetime;
}
Index: TransferReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferReceipt.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TransferReceipt.java 10 Nov 2003 17:42:07 -0000 1.2
--- TransferReceipt.java 20 Nov 2003 16:01:59 -0000 1.3
***************
*** 3,6 ****
--- 3,7 ----
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
+ import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
***************
*** 16,31 ****
private final String reqid;
! TransferReceipt(String name, Identity signer, Timestamp timestamp, String digest, Asset asset, Identity from, Identity to, String reqid, double amount, Date valuetime, String comment) throws NeuClearException {
! super(name, signer, timestamp, digest, asset, to, amount, valuetime, comment);
this.from = from;
this.reqid = reqid;
}
-
public final Identity getFrom() {
return from;
}
! public String getRequestId() {
return reqid;
}
--- 17,31 ----
private final String reqid;
! TransferReceipt(SignedNamedCore core, Asset asset, Identity from, Identity to, String reqid, double amount, Date valuetime, String comment) throws NeuClearException {
! super(core, asset, to, amount, valuetime, comment);
this.from = from;
this.reqid = reqid;
}
public final Identity getFrom() {
return from;
}
! public final String getRequestId() {
return reqid;
}
Index: TransferRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferRequest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TransferRequest.java 10 Nov 2003 17:42:07 -0000 1.2
--- TransferRequest.java 20 Nov 2003 16:01:59 -0000 1.3
***************
*** 3,6 ****
--- 3,7 ----
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
+ import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
***************
*** 14,21 ****
public class TransferRequest extends TransferContract {
! TransferRequest(String name, Identity signer, Timestamp timestamp, String digest, Asset asset, Identity to, double amount, Date valuetime, String comment) throws NeuClearException {
! super(name, signer, timestamp, digest, asset, to, amount, valuetime, comment);
}
-
public final Identity getFrom() {
--- 15,21 ----
public class TransferRequest extends TransferContract {
! TransferRequest(SignedNamedCore core, Asset asset, Identity to, double amount, Date valuetime, String comment) throws NeuClearException {
! super(core, asset, to, amount, valuetime, comment);
}
public final Identity getFrom() {
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id In directory sc8-pr-cvs1:/tmp/cvs-serv5401/src/java/org/neuclear/id Modified Files: Identity.java NamedObjectReader.java SignatureRequest.java SignedNamedObject.java Added Files: SignedNamedCore.java Log Message: Did a security review of the basic Verification process and needed to make changes. I've introduced the SignedNamedCore which all subclasses of SignedNamedObject need to include in their constructor. What does this mean? It means that all subclasses of SignedNamedObject have a guaranteed "signed final ticket" that can only be created in one place. This also simplifies the constructors as well as the NamedObjectReaders. I've gone through making everything in these contracts that is possible final. Thus further ensuring the security. --- NEW FILE: SignedNamedCore.java --- /* * $Id: SignedNamedCore.java,v 1.1 2003/11/20 16:01:25 pelle Exp $ * $Log: SignedNamedCore.java,v $ * Revision 1.1 2003/11/20 16:01:25 pelle * Did a security review of the basic Verification process and needed to make changes. * I've introduced the SignedNamedCore which all subclasses of SignedNamedObject need to include in their constructor. * What does this mean? * It means that all subclasses of SignedNamedObject have a guaranteed "signed final ticket" that can only be created in one place. * This also simplifies the constructors as well as the NamedObjectReaders. * I've gone through making everything in these contracts that is possible final. Thus further ensuring the security. * * Revision 1.10 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. * Updated all major interfaces that used the old model to use the new model. * * Revision 1.9 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.8 2003/11/10 21:08:49 pelle * More JavaDoc * * Revision 1.7 2003/10/25 00:39:54 pelle * Fixed SmtpSender it now sends the messages. * Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator * is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants. * Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2 * * Revision 1.6 2003/10/21 22:31:13 pelle * Renamed NeudistException to NeuClearException and moved it to org.neuclear.commons where it makes more sense. * 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.5 2003/10/01 19:08:31 pelle * Changed XML Format. Now NameSpace has been modified to Identity also the * xml namespace prefix nsdl has been changed to neuid. * The standard constants for using these have been moved into NSTools. * The NamedObjectBuilder can also now take an Element, such as an unsigned template. * * Revision 1.4 2003/10/01 17:05:37 pelle * Moved the NeuClearCertificate class to be an inner class of Identity. * * Revision 1.3 2003/09/30 23:25:14 pelle * Added new JCE Provider and java Certificate implementation for NeuClear Identity. * * Revision 1.2 2003/09/29 23:17:31 pelle * Changes to the senders. Now the senders only work with NamedObjectBuilders * which are the only NamedObject representations that contain full XML. * * Revision 1.1 2003/09/24 23:56:48 pelle * Refactoring nearly done. New model for creating signed objects. * 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.3 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:41:03 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.13 2003/02/18 14:57:19 pelle * Finished Cleaning up Receivers and Stores. * Also updated nsdl.xsd xml schema with latest changes. * The whole API is now very simple. * * Revision 1.12 2003/02/14 21:10:30 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 send() which allows one to send a named object to the Identity's * default receiver. * * Revision 1.11 2003/02/14 14:04:29 pelle * The New Source Classes work and NS resolution works as well. * I've renamed Target to TargetReference to prepare for the other main refactoring ahead. Implementation of * Senders. * * Revision 1.10 2003/02/10 22:30:06 pelle * Got rid of even further dependencies. In Particular OSCore * * Revision 1.9 2003/02/09 00:15:52 pelle * Fixed things so they now compile with r_0.7 of XMLSig * * Revision 1.8 2002/12/17 21:53:28 pelle * Final changes for refactoring. * * Revision 1.7 2002/12/17 20:34:39 pelle * Lots of changes to core functionality. * First of all I've refactored most of the Resolving and verification code. I have a few more things to do * on it before I'm happy. * There is now a NSResolver class, which handles all the namespace resolution. I took most of the functionality * for this out of SignedNamedObject. * Then there is the veriifer, which verifies a given SignedNamedObject using the NSResolver. * This has simplified the SignedNamedObject classes drastically, leaving them as mainly data objects, which is what they * should be. * I have also gone around and tightened up security on many different classes, making clases and/or methods final where appropriate. * NSCache now operates using http://www.waterken.com's fantastic ADT collections library. * Something important has been added, which is a SignRequest named object. This signed object, embeds an unsigned * named object for signing by an end users' signing service. * Now were almost ready to start seriously implementing AssetIssuers and Transfers, which will be the most important * part of the framework. * * Revision 1.6 2002/10/03 01:51:58 pelle * Bunch of smaller fixes for bugs found during deployment. * Also a bit more documentation. * I'm happy with this being called rev. 0.4 * * Revision 1.5 2002/10/02 21:03:44 pelle * Major Commit * I completely redid the namespace resolving code. * It now works correctly with the new store attribute of the namespace * And can correctly work out the location of a namespace file * by hierarchically signing it. * I have also included several top level namespaces and finalised * the root namespace. * In short all of the above means that we can theoretically call * Neubia live now. (Well on my first deployment anyway). * There is a new CommandLineSigner utility class which creates and signs * namespaces using standard java keystores. * I'm now working on updating the documentation, so other people * than me might have a chance at using it. * * Revision 1.4 2002/09/25 19:20:15 pelle * Added various new schemas and updated most of the existing ones. * Added explanation interface for explaining the purpose of a * SignedNamedObject to a user. We may want to use XSL instead. * Also made the signing webapp look a bit nicer. * * Revision 1.3 2002/09/21 23:11:13 pelle * A bunch of clean ups. Got rid of as many hard coded URL's as I could. * * Revision 1.2 2002/09/20 01:15:18 pelle * Added prototype webapplication under src/java * SOAPServlet appears to work * Any webservices taking named objects should subclass from ReceiverServlet * SigningServlet is not completely working right now, but * will be the main prototype of a web based signer. * * Other new features are GenericNamedObject for simple instantiation of * arbitrary named objects. * * Revision 1.1.1.1 2002/09/18 10:55:40 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:22 pelle * Lets try one more time. This is the first rev of the next gen of Neudist * * */ 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.id.resolver.NSResolver; import org.neuclear.id.verifier.VerifyingReader; import java.sql.Timestamp; import java.io.InputStream; /** * The SignedNamedObject is a <i>secure</i> object normally encapsulating a Digitally signed contract of some * sort.<p> * Instances of SignedNamedObject and its sub classes are never instantiated directly by client code. * Instead it is created by its Reader inner class. This Reader implements NamedObjectReader and is called by * VerifyingReader.<p> * In most cases a user will load NamedObject through one of two methods: * <ul><li>NSResolver for permanent contracts stored on the internet, such as Identity Certificates</li> * <li>The other way they are often received are as return values when sending your own objects to WebServices.</l> * </ul> * To actually create and sign your own object use the NamedObjectBuilder or its subclasses. Each subclass of * SignedNamedObject should have a corresponding subclass of NamedObjectBuilder.<p> * These NamedObjectBuilder objects should be signed using your Signer, before being sent on to a web service. * * @see NamedObjectReader * @see org.neuclear.id.builders.NamedObjectBuilder * @see org.neuclear.id.verifier.VerifyingReader * @see org.neuclear.id.resolver.NSResolver * @see org.neuclear.senders.Sender * @see org.neuclear.commons.crypto.signers.Signer */ public final class SignedNamedCore { private SignedNamedCore(String name, Identity signer, Timestamp timestamp, String encoded) { this.name = name; this.signer = signer; this.timestamp = timestamp; this.encoded = encoded; } /** * Used to read and authenticate a SignedNamedObject. * @param elem * @return * @throws XMLException * @throws NeuClearException */ public final static SignedNamedCore read(Element elem) throws XMLException, NeuClearException { String name = NSTools.normalizeNameURI(elem.attributeValue(getNameAttrQName())); String signatoryName = NSTools.getParentNSURI(name); Identity signatory = NSResolver.resolveIdentity(signatoryName); if (XMLSecTools.verifySignature(elem, signatory.getPublicKey())) { Timestamp timestamp = TimeTools.parseTimeStamp(elem.attributeValue("timestamp")); return new SignedNamedCore( name, signatory, timestamp,new String(XMLSecTools.canonicalize(elem))); } else throw new InvalidNamedObject(name + " isnt valid"); } /** * 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 * * @return String containing the fully qualified URI of an object */ public final String getName() { return name; } /** * The Name of an object within it's parent Identity * <p/> * eg.:<pre> * getName() = "neu://test/hello" * getLocalName() = "hello": * </pre> * * @return Name */ public final String getLocalName() { String fullName = getName(); int i = fullName.lastIndexOf('/'); return fullName.substring(i + 1); } /** * The time the object was signed * * @return */ public final Timestamp getTimeStamp() { return timestamp; } /** * The Signatory of the current document. If the objects name is <tt>"neu://bob/abc"</tt>, then the signer * would be the Identity object <tt>"neu://bob/"</tt> * * @return */ public final Identity getSignatory() { return signer; } /** * The original xml document * * @return */ public final String getEncoded() { return encoded; } public final byte[] getDigest() { return CryptoTools.digest(encoded.getBytes()); } private final String name; private final Identity signer; private final Timestamp timestamp; private final String encoded; } Index: Identity.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Identity.java 19 Nov 2003 23:33:59 -0000 1.19 --- Identity.java 20 Nov 2003 16:01:25 -0000 1.20 *************** *** 2,5 **** --- 2,13 ---- * $Id$ * $Log$ + * Revision 1.20 2003/11/20 16:01:25 pelle + * Did a security review of the basic Verification process and needed to make changes. + * I've introduced the SignedNamedCore which all subclasses of SignedNamedObject need to include in their constructor. + * What does this mean? + * It means that all subclasses of SignedNamedObject have a guaranteed "signed final ticket" that can only be created in one place. + * This also simplifies the constructors as well as the NamedObjectReaders. + * I've gone through making everything in these contracts that is possible final. Thus further ensuring the security. + * * Revision 1.19 2003/11/19 23:33:59 pelle * Signers now can generatekeys via the generateKey() method. *************** *** 288,294 **** /** - * @param name The Name of Identity - * @param signatory The Signatory that signed this object - * @param timestamp The TimeStamp of the SignedNamedObject * @param repository URL of Default Store for Identity. (Note. A Identity object is stored in the default repository of it's parent namespace) * @param signer URL of default interactive signing service for namespace. If null it doesnt allow interactive signing --- 296,299 ---- *************** *** 297,302 **** */ ! protected Identity(String name, Identity signatory, Timestamp timestamp, String encoded, String repository, String signer, String logger, String receiver, PublicKey pub) throws NeuClearException { ! super(name, signatory, timestamp, encoded); this.repository = repository; this.logger = logger; --- 302,307 ---- */ ! protected Identity(SignedNamedCore core, String repository, String signer, String logger, String receiver, PublicKey pub) throws NeuClearException { ! super(core); this.repository = repository; this.logger = logger; *************** *** 307,323 **** ! public String getRepository() { return repository; } ! public String getSigner() { return signer; } ! public String getLogger() { return logger; } ! public SignedNamedObject send(SignedNamedObject obj) throws NeuClearException { if (!Utility.isEmpty(receiver)) return Sender.quickSend(receiver, obj); --- 312,328 ---- ! public final String getRepository() { return repository; } ! public final String getSigner() { return signer; } ! public final String getLogger() { return logger; } ! public SignedNamedObject send(SignedNamedObject obj) throws NeuClearException { if (!Utility.isEmpty(receiver)) return Sender.quickSend(receiver, obj); *************** *** 326,343 **** } ! void log(SignedNamedObject obj) throws NeuClearException { if (!Utility.isEmpty(logger)) Sender.quickSend(logger, obj); } ! public String getTagName() { ! return "Identity"; ! } ! ! public PublicKey getPublicKey() { return pub; } ! public Certificate getCertificate() { return new NeuClearCertificate(); } --- 331,344 ---- } ! final void log(SignedNamedObject obj) throws NeuClearException { if (!Utility.isEmpty(logger)) Sender.quickSend(logger, obj); } ! public final PublicKey getPublicKey() { return pub; } ! public final Certificate getCertificate() { return new NeuClearCertificate(); } *************** *** 354,358 **** try { PublicKey rootpk = CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP); ! return new Identity("neu://", null, new Timestamp(0), null, NSResolver.NSROOTSTORE, null, null, null, rootpk); } catch (NeuClearException e) { --- 355,359 ---- try { PublicKey rootpk = CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP); ! return new Identity(SignedNamedCore.createRootCore(), NSResolver.NSROOTSTORE, null, null, null, rootpk); } catch (NeuClearException e) { *************** *** 385,389 **** } ! private class NeuClearCertificate extends Certificate { public NeuClearCertificate() { super("NeuClear"); --- 386,390 ---- } ! private final class NeuClearCertificate extends Certificate { public NeuClearCertificate() { super("NeuClear"); *************** *** 398,402 **** * @throws CertificateEncodingException */ ! public byte[] getEncoded() throws CertificateEncodingException { return getEncoded(); } --- 399,403 ---- * @throws CertificateEncodingException */ ! public final byte[] getEncoded() throws CertificateEncodingException { return getEncoded(); } *************** *** 414,431 **** * @throws SignatureException */ ! public void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { if (!getSignatory().getPublicKey().equals(publicKey)) throw new SignatureException("Key didnt match Signature"); } ! public void verify(PublicKey publicKey, String string) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { verify(publicKey); } ! public PublicKey getPublicKey() { return pub; } ! public String toString() { return getName(); } --- 415,432 ---- * @throws SignatureException */ ! public final void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { if (!getSignatory().getPublicKey().equals(publicKey)) throw new SignatureException("Key didnt match Signature"); } ! public final void verify(PublicKey publicKey, String string) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { verify(publicKey); } ! public final PublicKey getPublicKey() { return pub; } ! public final String toString() { return getName(); } *************** *** 441,445 **** * @return */ ! public SignedNamedObject read(Element elem, String name, Identity signatory, String encoded, Timestamp timestamp) throws XMLSecurityException, NeuClearException { String repository = elem.attributeValue(DocumentHelper.createQName("repository", NSTools.NS_NEUID)); String signer = elem.attributeValue(DocumentHelper.createQName("signer", NSTools.NS_NEUID)); --- 442,446 ---- * @return */ ! public final SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException { String repository = elem.attributeValue(DocumentHelper.createQName("repository", NSTools.NS_NEUID)); String signer = elem.attributeValue(DocumentHelper.createQName("signer", NSTools.NS_NEUID)); *************** *** 450,455 **** KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo"))); PublicKey pub = ki.getPublicKey(); ! return new Identity(name, signatory, timestamp, encoded, repository, signer, logger, receiver, pub); ! } } --- 451,455 ---- KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo"))); PublicKey pub = ki.getPublicKey(); ! return new Identity(core, repository, signer, logger, receiver, pub); } } Index: NamedObjectReader.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/NamedObjectReader.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NamedObjectReader.java 19 Nov 2003 23:33:59 -0000 1.4 --- NamedObjectReader.java 20 Nov 2003 16:01:25 -0000 1.5 *************** *** 27,30 **** --- 27,38 ---- $Id$ $Log$ + Revision 1.5 2003/11/20 16:01:25 pelle + Did a security review of the basic Verification process and needed to make changes. + I've introduced the SignedNamedCore which all subclasses of SignedNamedObject need to include in their constructor. + What does this mean? + It means that all subclasses of SignedNamedObject have a guaranteed "signed final ticket" that can only be created in one place. + This also simplifies the constructors as well as the NamedObjectReaders. + I've gone through making everything in these contracts that is possible final. Thus further ensuring the security. + Revision 1.4 2003/11/19 23:33:59 pelle Signers now can generatekeys via the generateKey() method. *************** *** 71,74 **** * @return */ ! public SignedNamedObject read(Element elem, String name, Identity signatory, String encoded, Timestamp timestamp) throws NeuClearException, XMLSecurityException; } --- 79,82 ---- * @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.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SignatureRequest.java 19 Nov 2003 23:33:59 -0000 1.4 --- SignatureRequest.java 20 Nov 2003 16:01:25 -0000 1.5 *************** *** 30,33 **** --- 30,41 ---- $Id$ $Log$ + Revision 1.5 2003/11/20 16:01:25 pelle + Did a security review of the basic Verification process and needed to make changes. + I've introduced the SignedNamedCore which all subclasses of SignedNamedObject need to include in their constructor. + What does this mean? + It means that all subclasses of SignedNamedObject have a guaranteed "signed final ticket" that can only be created in one place. + This also simplifies the constructors as well as the NamedObjectReaders. + I've gone through making everything in these contracts that is possible final. Thus further ensuring the security. + Revision 1.4 2003/11/19 23:33:59 pelle Signers now can generatekeys via the generateKey() method. *************** *** 63,69 **** * Time: 12:23:52 PM */ ! public class SignatureRequest extends SignedNamedObject { ! private SignatureRequest(String name, Identity signer, Timestamp timestamp, String encoded, String userid, NamedObjectBuilder unsigned, String description) throws NeuClearException { ! super(name, signer, timestamp, encoded); this.userid = userid; this.unsigned = unsigned; --- 71,77 ---- * Time: 12:23:52 PM */ ! public final class SignatureRequest extends SignedNamedObject { ! private SignatureRequest(SignedNamedCore core, String userid, NamedObjectBuilder unsigned, String description) throws NeuClearException { ! super(core); this.userid = userid; this.unsigned = unsigned; *************** *** 71,83 **** } ! public String getUserid() { return userid; } ! public NamedObjectBuilder getUnsigned() { return unsigned; } ! public String getDescription() { return description; } --- 79,91 ---- } ! public final String getUserid() { return userid; } ! public final NamedObjectBuilder getUnsigned() { return unsigned; } ! public final String getDescription() { return description; } *************** *** 90,94 **** * @return */ ! public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws XMLSecurityException, NeuClearException { Element request = elem.element(DocumentHelper.createQName("Unsigned", NSTools.NS_NEUID)); String userid = elem.attributeValue(DocumentHelper.createQName("userid", NSTools.NS_NEUID)); --- 98,102 ---- * @return */ ! public final SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException { Element request = elem.element(DocumentHelper.createQName("Unsigned", NSTools.NS_NEUID)); String userid = elem.attributeValue(DocumentHelper.createQName("userid", NSTools.NS_NEUID)); *************** *** 101,106 **** description = descrelem.getText(); ! return new SignatureRequest(name, signatory, timestamp, digest, userid, unsigned, description); } } --- 109,115 ---- description = descrelem.getText(); ! return new SignatureRequest(core, userid, unsigned, description); } + } Index: SignedNamedObject.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/SignedNamedObject.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SignedNamedObject.java 19 Nov 2003 23:33:59 -0000 1.10 --- SignedNamedObject.java 20 Nov 2003 16:01:25 -0000 1.11 *************** *** 2,5 **** --- 2,13 ---- * $Id$ * $Log$ + * Revision 1.11 2003/11/20 16:01:25 pelle + * Did a security review of the basic Verification process and needed to make changes. + * I've introduced the SignedNamedCore which all subclasses of SignedNamedObject need to include in their constructor. + * What does this mean? + * It means that all subclasses of SignedNamedObject have a guaranteed "signed final ticket" that can only be created in one place. + * This also simplifies the constructors as well as the NamedObjectReaders. + * I've gone through making everything in these contracts that is possible final. Thus further ensuring the security. + * * Revision 1.10 2003/11/19 23:33:59 pelle * Signers now can generatekeys via the generateKey() method. *************** *** 189,192 **** --- 197,201 ---- import org.neuclear.commons.NeuClearException; import org.neuclear.commons.crypto.CryptoTools; + import org.neuclear.xml.xmlsec.XMLSecurityException; import java.sql.Timestamp; *************** *** 215,223 **** public class SignedNamedObject implements SignedObject, Named { ! protected SignedNamedObject(String name, Identity signer, Timestamp timestamp, String encoded) throws NeuClearException { ! this.name = NSTools.normalizeNameURI(name); ! this.signer = signer; ! this.timestamp = timestamp; ! this.encoded = encoded; } --- 224,229 ---- public class SignedNamedObject implements SignedObject, Named { ! protected SignedNamedObject(SignedNamedCore core) throws NeuClearException { ! this.core=core; } *************** *** 227,232 **** * @return String containing the fully qualified URI of an object */ ! public String getName() { ! return name; } --- 233,238 ---- * @return String containing the fully qualified URI of an object */ ! public final String getName() { ! return core.getName(); } *************** *** 241,248 **** * @return Name */ ! public String getLocalName() { ! String fullName = getName(); ! int i = fullName.lastIndexOf('/'); ! return fullName.substring(i + 1); } --- 247,252 ---- * @return Name */ ! public final String getLocalName() { ! return core.getLocalName(); } *************** *** 253,258 **** * @return */ ! public Timestamp getTimeStamp() { ! return timestamp; } --- 257,262 ---- * @return */ ! public final Timestamp getTimeStamp() { ! return core.getTimeStamp(); } *************** *** 264,269 **** * @return */ ! public Identity getSignatory() { ! return signer; } --- 268,273 ---- * @return */ ! public final Identity getSignatory() { ! return core.getSignatory(); } *************** *** 274,300 **** */ public final String getEncoded() { ! return encoded; } public final byte[] getDigest() { ! return CryptoTools.digest(encoded.getBytes()); } ! private final String name; ! private final Identity signer; ! private final Timestamp timestamp; ! private final String encoded; final public static class Reader implements NamedObjectReader { /** * Read object from Element and fill in its details * * @param elem * @return */ - public SignedNamedObject read(Element elem, String name, Identity signatory, String encoded, Timestamp timestamp) throws NeuClearException { - - return new SignedNamedObject(name, signatory, timestamp, encoded); - } } --- 278,306 ---- */ public final String getEncoded() { ! return core.getEncoded(); } public final byte[] getDigest() { ! return core.getDigest(); } ! private final SignedNamedCore core; final public static class Reader implements NamedObjectReader { /** * Read object from Element and fill in its details + * + * @param elem + * @return + */ + public SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException { + return new SignedNamedObject(core); + } + /** + * Read object from Element and fill in its details * * @param elem * @return */ } |
|
From: <pe...@us...> - 2003-11-20 16:01:30
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv5401/src/java/org/neuclear/id/verifier
Modified Files:
VerifyingReader.java
Log Message:
Did a security review of the basic Verification process and needed to make changes.
I've introduced the SignedNamedCore which all subclasses of SignedNamedObject need to include in their constructor.
What does this mean?
It means that all subclasses of SignedNamedObject have a guaranteed "signed final ticket" that can only be created in one place.
This also simplifies the constructors as well as the NamedObjectReaders.
I've gone through making everything in these contracts that is possible final. Thus further ensuring the security.
Index: VerifyingReader.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier/VerifyingReader.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** VerifyingReader.java 19 Nov 2003 23:33:59 -0000 1.10
--- VerifyingReader.java 20 Nov 2003 16:01:25 -0000 1.11
***************
*** 38,41 ****
--- 38,49 ----
$Id$
$Log$
+ Revision 1.11 2003/11/20 16:01:25 pelle
+ Did a security review of the basic Verification process and needed to make changes.
+ I've introduced the SignedNamedCore which all subclasses of SignedNamedObject need to include in their constructor.
+ What does this mean?
+ It means that all subclasses of SignedNamedObject have a guaranteed "signed final ticket" that can only be created in one place.
+ This also simplifies the constructors as well as the NamedObjectReaders.
+ I've gone through making everything in these contracts that is possible final. Thus further ensuring the security.
+
Revision 1.10 2003/11/19 23:33:59 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 121,137 ****
* @throws NeuClearException
*/
! public SignedNamedObject read(InputStream is) throws XMLException, NeuClearException {
Element elem = XMLTools.loadDocument(is).getRootElement();
! String name = NSTools.normalizeNameURI(elem.attributeValue(getNameAttrQName()));
! String signatoryName = NSTools.getParentNSURI(name);
!
! Identity signatory = NSResolver.resolveIdentity(signatoryName);
! if (XMLSecTools.verifySignature(elem, signatory.getPublicKey())) {
! Timestamp timestamp = TimeTools.parseTimeStamp(elem.attributeValue("timestamp"));
! return resolveReader(elem).read(elem, name, signatory, new String(XMLSecTools.canonicalize(elem)), timestamp);
! } else
! throw new InvalidNamedObject(name + " isnt valid");
}
private NamedObjectReader resolveReader(Element elem) {
NamedObjectReader reader = (NamedObjectReader) readers.get(elem.getName());
--- 129,138 ----
* @throws NeuClearException
*/
! public final SignedNamedObject read(InputStream is) throws XMLException, NeuClearException {
Element elem = XMLTools.loadDocument(is).getRootElement();
! return resolveReader(elem).read(SignedNamedCore.read(elem),elem);
}
+
private NamedObjectReader resolveReader(Element elem) {
NamedObjectReader reader = (NamedObjectReader) readers.get(elem.getName());
***************
*** 141,148 ****
}
- private static QName getNameAttrQName() {
- return DocumentHelper.createQName("name", NSTools.NS_NEUID);
-
- }
public void registerReader(String name, NamedObjectReader reader) {
--- 142,145 ----
|
|
From: <pe...@us...> - 2003-11-20 16:01:30
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/auth
In directory sc8-pr-cvs1:/tmp/cvs-serv5401/src/java/org/neuclear/auth
Modified Files:
AuthenticationTicket.java
Log Message:
Did a security review of the basic Verification process and needed to make changes.
I've introduced the SignedNamedCore which all subclasses of SignedNamedObject need to include in their constructor.
What does this mean?
It means that all subclasses of SignedNamedObject have a guaranteed "signed final ticket" that can only be created in one place.
This also simplifies the constructors as well as the NamedObjectReaders.
I've gone through making everything in these contracts that is possible final. Thus further ensuring the security.
Index: AuthenticationTicket.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/auth/AuthenticationTicket.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AuthenticationTicket.java 19 Nov 2003 23:33:58 -0000 1.3
--- AuthenticationTicket.java 20 Nov 2003 16:01:25 -0000 1.4
***************
*** 17,20 ****
--- 17,21 ----
import org.neuclear.id.NamedObjectReader;
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.id.SignedNamedCore;
import org.neuclear.xml.xmlsec.XMLSecurityException;
***************
*** 25,29 ****
* It generates a unique Name in the users Identity, which the user then signs.
*/
! public class AuthenticationTicket extends SignedNamedObject {
/**
* <p>Used by a website to create an authentication ticket for validation.</p>
--- 26,30 ----
* It generates a unique Name in the users Identity, which the user then signs.
*/
! public final class AuthenticationTicket extends SignedNamedObject {
/**
* <p>Used by a website to create an authentication ticket for validation.</p>
***************
*** 35,49 ****
* </pre>
*
! * @param name
! * @param signatory
! * @param timestamp
! * @param encoded
! * @param requester
* @param validto
* @param siteurl
* @throws NeuClearException
*/
! private AuthenticationTicket(String name, Identity signatory, Timestamp timestamp, String encoded, String requester, Timestamp validto, String siteurl) throws NeuClearException {
! super(name, signatory, timestamp, encoded);
this.validTo = validto;
this.siteurl = siteurl;
--- 36,47 ----
* </pre>
*
! * @param core
! * @param requester
* @param validto
* @param siteurl
* @throws NeuClearException
*/
! private AuthenticationTicket(SignedNamedCore core, String requester, Timestamp validto, String siteurl) throws NeuClearException {
! super(core);
this.validTo = validto;
this.siteurl = siteurl;
***************
*** 52,63 ****
}
- /*
- public static SignatureRequest createAuthenticationRequest(String user, String requester, long validity, String siteurl, String targeturl, PrivateKey signer) throws NeuClearException {
- AuthenticationTicket ticket = new AuthenticationTicket(user, requester, validity, siteurl);
- return SignatureRequest.createRequest(requester, targeturl, ticket, signer);
-
- }
- */
-
/**
--- 50,53 ----
***************
*** 67,71 ****
* @throws NeuClearException
*/
! public Timestamp getValidTo() throws NeuClearException {
return validTo;
}
--- 57,61 ----
* @throws NeuClearException
*/
! public final Timestamp getValidTo() throws NeuClearException {
return validTo;
}
***************
*** 76,87 ****
* @return the URL or null if unavailable.
*/
! public String getSiteHref() {
return siteurl;
}
- public String getTagName() {
- return TAG_NAME;
- }
-
public final static class Reader implements NamedObjectReader {
/**
--- 66,73 ----
* @return the URL or null if unavailable.
*/
! public final String getSiteHref() {
return siteurl;
}
public final static class Reader implements NamedObjectReader {
/**
***************
*** 91,100 ****
* @return
*/
! public SignedNamedObject read(Element elem, String name, Identity signatory, String digest, Timestamp timestamp) throws XMLSecurityException, NeuClearException {
String requester = elem.attributeValue(DocumentHelper.createQName("requester", NS_NSAUTH));
String sitehref = elem.attributeValue(DocumentHelper.createQName("sitehref", NS_NSAUTH));
Timestamp validto = TimeTools.parseTimeStamp(elem.attributeValue(DocumentHelper.createQName("validto", NS_NSAUTH)));
! return new AuthenticationTicket(name, signatory, timestamp, digest, requester, validto, sitehref);
}
--- 77,86 ----
* @return
*/
! public final SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException {
String requester = elem.attributeValue(DocumentHelper.createQName("requester", NS_NSAUTH));
String sitehref = elem.attributeValue(DocumentHelper.createQName("sitehref", NS_NSAUTH));
Timestamp validto = TimeTools.parseTimeStamp(elem.attributeValue(DocumentHelper.createQName("validto", NS_NSAUTH)));
! return new AuthenticationTicket(core, requester, validto, sitehref);
}
|
|
From: <pe...@us...> - 2003-11-19 23:34:43
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store
In directory sc8-pr-cvs1:/tmp/cvs-serv12836/src/test/org/neuclear/store
Modified Files:
AbstractStoreTest.java
Log Message:
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.
Updated all major interfaces that used the old model to use the new model.
Index: AbstractStoreTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/store/AbstractStoreTest.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** AbstractStoreTest.java 18 Nov 2003 15:45:09 -0000 1.12
--- AbstractStoreTest.java 19 Nov 2003 23:34:00 -0000 1.13
***************
*** 2,5 ****
--- 2,14 ----
$Id$
$Log$
+ Revision 1.13 2003/11/19 23:34:00 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.
+ Updated all major interfaces that used the old model to use the new model.
+
Revision 1.12 2003/11/18 15:45:09 pelle
FileStoreTest now passes. FileStore works again.
***************
*** 136,152 ****
package org.neuclear.store;
- import junit.framework.TestCase;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.InvalidNamedObject;
import org.neuclear.id.SignedNamedObject;
- import org.neuclear.id.NSTools;
import org.neuclear.id.builders.IdentityBuilder;
- import org.neuclear.xml.xmlsec.XMLSecurityException;
import org.neuclear.tests.AbstractSigningTest;
import java.security.GeneralSecurityException;
- import java.security.KeyPair;
- import java.security.KeyPairGenerator;
- import java.security.SecureRandom;
--- 145,156 ----
package org.neuclear.store;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.InvalidNamedObject;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.builders.IdentityBuilder;
import org.neuclear.tests.AbstractSigningTest;
+ import org.neuclear.xml.XMLException;
import java.security.GeneralSecurityException;
***************
*** 171,193 ****
! public void testStore() throws NeuClearException, InvalidNamedObject, XMLSecurityException {
System.out.println("\nTesting " + this.getClass().getName());
System.out.println("Storing " + bobName);
! IdentityBuilder bob=new IdentityBuilder(bobName,signer.getPublicKey(bobName));
! bob.sign(signer);
! store.receive(bob);
System.out.println("Storing " + aliceName);
! IdentityBuilder alice=new IdentityBuilder(aliceName,signer.getPublicKey(aliceName));
! alice.sign(signer);
! store.receive(alice);
! System.out.println("Fetching "+bobName);
! SignedNamedObject nobj2=store.fetch(bobName);
assertNotNull(nobj2);
! assertEquals(bobName,nobj2.getName());
! System.out.println("Fetching "+aliceName);
! SignedNamedObject nobj4=store.fetch(aliceName);
! assertEquals(aliceName,nobj4.getName());
}
--- 175,195 ----
! public void testStore() throws NeuClearException, InvalidNamedObject, XMLException {
System.out.println("\nTesting " + this.getClass().getName());
System.out.println("Storing " + bobName);
! IdentityBuilder bob = new IdentityBuilder(bobName, signer.getPublicKey(bobName));
! store.receive(bob.sign(signer));
System.out.println("Storing " + aliceName);
! IdentityBuilder alice = new IdentityBuilder(aliceName, signer.getPublicKey(aliceName));
! store.receive(alice.sign(signer));
! System.out.println("Fetching " + bobName);
! SignedNamedObject nobj2 = store.fetch(bobName);
assertNotNull(nobj2);
! assertEquals(bobName, nobj2.getName());
! System.out.println("Fetching " + aliceName);
! SignedNamedObject nobj4 = store.fetch(aliceName);
! assertEquals(aliceName, nobj4.getName());
}
|
|
From: <pe...@us...> - 2003-11-19 23:34:43
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/jce
In directory sc8-pr-cvs1:/tmp/cvs-serv12836/src/test/org/neuclear/id/jce
Modified Files:
NeuClearJCETest.java
Log Message:
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.
Updated all major interfaces that used the old model to use the new model.
Index: NeuClearJCETest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/jce/NeuClearJCETest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NeuClearJCETest.java 18 Nov 2003 15:07:37 -0000 1.2
--- NeuClearJCETest.java 19 Nov 2003 23:34:00 -0000 1.3
***************
*** 1,22 ****
package org.neuclear.id.jce;
- import junit.framework.TestCase;
-
- import java.security.*;
- import java.security.cert.Certificate;
- import java.security.cert.CertificateFactory;
- import java.security.cert.CertificateException;
-
- import org.neuclear.tests.AbstractSigningTest;
import org.neuclear.commons.NeuClearException;
- import org.neuclear.commons.crypto.CryptoException;
import org.neuclear.commons.crypto.passphraseagents.AlwaysTheSamePassphraseAgent;
import org.neuclear.commons.crypto.signers.JCESigner;
import org.neuclear.id.Identity;
- import org.neuclear.id.builders.IdentityBuilder;
import org.neuclear.id.builders.AuthenticationTicketBuilder;
! import org.neuclear.xml.xmlsec.XMLSecurityException;
import org.neuclear.xml.XMLException;
/*
NeuClear Distributed Transaction Clearing Platform
--- 1,18 ----
package org.neuclear.id.jce;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.passphraseagents.AlwaysTheSamePassphraseAgent;
import org.neuclear.commons.crypto.signers.JCESigner;
import org.neuclear.id.Identity;
import org.neuclear.id.builders.AuthenticationTicketBuilder;
! import org.neuclear.id.builders.IdentityBuilder;
! import org.neuclear.tests.AbstractSigningTest;
import org.neuclear.xml.XMLException;
+ import java.security.*;
+ import java.security.cert.Certificate;
+ import java.security.cert.CertificateException;
+ import java.security.cert.CertificateFactory;
+
/*
NeuClear Distributed Transaction Clearing Platform
***************
*** 39,42 ****
--- 35,47 ----
$Id$
$Log$
+ Revision 1.3 2003/11/19 23:34:00 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.
+ Updated all major interfaces that used the old model to use the new model.
+
Revision 1.2 2003/11/18 15:07:37 pelle
Changes to JCE Implementation
***************
*** 49,53 ****
/**
- *
* User: pelleb
* Date: Oct 1, 2003
--- 54,57 ----
***************
*** 66,93 ****
assertNotNull(Security.getProvider("NeuClear"));
}
public void testCertificateFactory() throws CertificateException {
assertNotNull(CertificateFactory.getInstance("NeuClear"));
}
public void testGetCertificate() throws NeuClearException, XMLException {
! IdentityBuilder id=new IdentityBuilder("neu://bob@test",signer.getPublicKey("neu://bob@test"));
! id.sign(signer);
! Identity bob=(Identity) id.verify();
! Certificate cert=bob.getCertificate();
assertNotNull(cert);
! assertEquals(cert.getPublicKey(),bob.getPublicKey());
}
public void testStoreKey() throws NeuClearException, XMLException, NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException {
! KeyPairGenerator kpg=KeyPairGenerator.getInstance("RSA","BC");
! KeyStore ks=KeyStore.getInstance("jks","SUN");
kpg.initialize(512);
! KeyPair kp=kpg.generateKeyPair();
! JCESigner sig2=new JCESigner(ks,new AlwaysTheSamePassphraseAgent("neuclear"));
! IdentityBuilder id=new IdentityBuilder("neu://eve@test",kp.getPublic());
! id.sign(signer);
! Identity eve=(Identity) id.verify();
! ks.setKeyEntry("neu://eve@test",kp.getPrivate(),"neuclear".toCharArray(),eve.getCertificateChain());
! AuthenticationTicketBuilder authb=new AuthenticationTicketBuilder("neu://eve@test","neu://test","http://users.neuclear.org:8080");
authb.sign(sig2);
--- 70,99 ----
assertNotNull(Security.getProvider("NeuClear"));
}
+
public void testCertificateFactory() throws CertificateException {
assertNotNull(CertificateFactory.getInstance("NeuClear"));
}
+
public void testGetCertificate() throws NeuClearException, XMLException {
! IdentityBuilder id = new IdentityBuilder("neu://bob@test", signer.getPublicKey("neu://bob@test"));
! Identity bob = (Identity) id.sign(signer);
! Certificate cert = bob.getCertificate();
assertNotNull(cert);
! assertEquals(cert.getPublicKey(), bob.getPublicKey());
}
+
public void testStoreKey() throws NeuClearException, XMLException, NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException {
! KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", "BC");
! KeyStore ks = KeyStore.getInstance("jks", "SUN");
kpg.initialize(512);
! KeyPair kp = kpg.generateKeyPair();
! JCESigner sig2 = new JCESigner(ks, new AlwaysTheSamePassphraseAgent("neuclear"));
! IdentityBuilder id = new IdentityBuilder("neu://eve@test", kp.getPublic());
! Identity eve = (Identity) id.sign(signer);
! ks.setKeyEntry("neu://eve@test", kp.getPrivate(), "neuclear".toCharArray(), eve.getCertificateChain());
!
! AuthenticationTicketBuilder authb = new AuthenticationTicketBuilder("neu://eve@test", "neu://test", "http://users.neuclear.org:8080");
authb.sign(sig2);
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv12836/src/test/org/neuclear/id/builders
Modified Files:
AuthenticationBuilderTest.java IdentityBuilderTest.java
SigningRequestBuilderTest.java
Log Message:
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.
Updated all major interfaces that used the old model to use the new model.
Index: AuthenticationBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/AuthenticationBuilderTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** AuthenticationBuilderTest.java 18 Nov 2003 00:01:56 -0000 1.1
--- AuthenticationBuilderTest.java 19 Nov 2003 23:34:00 -0000 1.2
***************
*** 29,32 ****
--- 29,41 ----
$Id$
$Log$
+ Revision 1.2 2003/11/19 23:34:00 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.
+ Updated all major interfaces that used the old model to use the new model.
+
Revision 1.1 2003/11/18 00:01:56 pelle
The sample signing web application for logging in and out is now working.
***************
*** 48,56 ****
AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder("neu://bob@test", "neu://test", "http://users.neuclear.org:8080");
assertEquals(authreq.getParent().getName(), "neu://bob@test");
- authreq.sign(signer);
- assertTrue(authreq.isSigned());
try {
! AuthenticationTicket auth = (AuthenticationTicket) authreq.verify();
! assertTrue(true);
assertEquals(auth.getName(), authreq.getName());
assertEquals(auth.getSiteHref(), "http://users.neuclear.org:8080");
--- 57,63 ----
AuthenticationTicketBuilder authreq = new AuthenticationTicketBuilder("neu://bob@test", "neu://test", "http://users.neuclear.org:8080");
assertEquals(authreq.getParent().getName(), "neu://bob@test");
try {
! AuthenticationTicket auth = (AuthenticationTicket) authreq.sign(signer);
! assertTrue(authreq.isSigned());
assertEquals(auth.getName(), authreq.getName());
assertEquals(auth.getSiteHref(), "http://users.neuclear.org:8080");
Index: IdentityBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/IdentityBuilderTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** IdentityBuilderTest.java 18 Nov 2003 15:07:37 -0000 1.5
--- IdentityBuilderTest.java 19 Nov 2003 23:34:00 -0000 1.6
***************
*** 10,14 ****
import org.neuclear.tests.AbstractSigningTest;
import org.neuclear.xml.XMLException;
- import org.neuclear.xml.XMLTools;
import java.io.File;
--- 10,13 ----
***************
*** 36,39 ****
--- 35,47 ----
$Id$
$Log$
+ Revision 1.6 2003/11/19 23:34:00 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.
+ Updated all major interfaces that used the old model to use the new model.
+
Revision 1.5 2003/11/18 15:07:37 pelle
Changes to JCE Implementation
***************
*** 78,92 ****
final String parent = NSTools.getParentNSURI(id.getName());
if (getSigner().canSignFor(parent)) {
id.sign(getSigner());
-
} else if (parent.equals("neu://")) {
id.sign(rootsigner);
}
File file = new File(PATH + NSTools.url2path(id.getName()) + "/root.id");
file.getParentFile().mkdirs();
- // XMLTools.writeFile(file, id.getElement());
System.out.println("Wrote: " + file.getAbsolutePath());
- SignedNamedObject sec = id.verify();
assertEquals(id.getName(), sec.getName());
assertTrue(true);
--- 86,99 ----
final String parent = NSTools.getParentNSURI(id.getName());
+ SignedNamedObject sec = null;
if (getSigner().canSignFor(parent)) {
id.sign(getSigner());
} else if (parent.equals("neu://")) {
id.sign(rootsigner);
}
+ assertNotNull(sec);
File file = new File(PATH + NSTools.url2path(id.getName()) + "/root.id");
file.getParentFile().mkdirs();
System.out.println("Wrote: " + file.getAbsolutePath());
assertEquals(id.getName(), sec.getName());
assertTrue(true);
Index: SigningRequestBuilderTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/builders/SigningRequestBuilderTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SigningRequestBuilderTest.java 18 Nov 2003 00:01:56 -0000 1.1
--- SigningRequestBuilderTest.java 19 Nov 2003 23:34:00 -0000 1.2
***************
*** 30,33 ****
--- 30,42 ----
$Id$
$Log$
+ Revision 1.2 2003/11/19 23:34:00 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.
+ Updated all major interfaces that used the old model to use the new model.
+
Revision 1.1 2003/11/18 00:01:56 pelle
The sample signing web application for logging in and out is now working.
***************
*** 50,64 ****
SignatureRequestBuilder sigreq = new SignatureRequestBuilder("neu://test", "neu://bob@test", authreq, "For testing purposes");
assertEquals(sigreq.getParent().getName(), "neu://test");
- sigreq.sign(signer);
- assertTrue(sigreq.isSigned());
try {
! SignatureRequest tosign = (SignatureRequest) sigreq.verify();
assertEquals(tosign.getName(), sigreq.getName());
NamedObjectBuilder auth2 = tosign.getUnsigned();
assertEquals(auth2.getParent().getName(), "neu://bob@test");
- auth2.sign(signer);
- assertTrue(auth2.isSigned());
! AuthenticationTicket auth = (AuthenticationTicket) auth2.verify();
assertEquals(auth.getName(), authreq.getName());
assertEquals(auth.getSiteHref(), "http://users.neuclear.org:8080");
--- 59,72 ----
SignatureRequestBuilder sigreq = new SignatureRequestBuilder("neu://test", "neu://bob@test", authreq, "For testing purposes");
assertEquals(sigreq.getParent().getName(), "neu://test");
try {
! SignatureRequest tosign = (SignatureRequest) sigreq.sign(signer);
! assertTrue(sigreq.isSigned());
assertEquals(tosign.getName(), sigreq.getName());
+
NamedObjectBuilder auth2 = tosign.getUnsigned();
assertEquals(auth2.getParent().getName(), "neu://bob@test");
! AuthenticationTicket auth = (AuthenticationTicket) auth2.sign(signer);
! assertTrue(auth2.isSigned());
assertEquals(auth.getName(), authreq.getName());
assertEquals(auth.getSiteHref(), "http://users.neuclear.org:8080");
|
|
From: <pe...@us...> - 2003-11-19 23:34:43
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet
In directory sc8-pr-cvs1:/tmp/cvs-serv12836/src/java/org/neuclear/signers/servlet
Modified Files:
SigningServlet.java
Log Message:
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.
Updated all major interfaces that used the old model to use the new model.
Index: SigningServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/signers/servlet/SigningServlet.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** SigningServlet.java 18 Nov 2003 23:35:45 -0000 1.13
--- SigningServlet.java 19 Nov 2003 23:33:59 -0000 1.14
***************
*** 2,5 ****
--- 2,14 ----
* $Id$
* $Log$
+ * Revision 1.14 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.
+ * Updated all major interfaces that used the old model to use the new model.
+ *
* Revision 1.13 2003/11/18 23:35:45 pelle
* Payment Web Application is getting there.
***************
*** 258,267 ****
try {
context.log("SIGN: Signing with " + parent);
! named.sign(signer);
isSigned = true;
out.println("Signed<br>");
out.println("<br>Verifying...");
out.flush();
- SignedNamedObject signed = named.verify();
out.println(signed.getName() + " Verified<br>");
--- 267,275 ----
try {
context.log("SIGN: Signing with " + parent);
! SignedNamedObject signed = named.sign(signer);
isSigned = true;
out.println("Signed<br>");
out.println("<br>Verifying...");
out.flush();
out.println(signed.getName() + " Verified<br>");
|
|
From: <pe...@us...> - 2003-11-19 23:34:43
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders In directory sc8-pr-cvs1:/tmp/cvs-serv12836/src/java/org/neuclear/senders Modified Files: LogSender.java Sender.java SmtpSender.java SoapSender.java Log Message: 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. Updated all major interfaces that used the old model to use the new model. Index: LogSender.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/LogSender.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** LogSender.java 11 Nov 2003 21:18:43 -0000 1.10 --- LogSender.java 19 Nov 2003 23:33:59 -0000 1.11 *************** *** 1,13 **** package org.neuclear.senders; - import org.neuclear.id.SignedNamedObject; - import org.neuclear.id.Named; - import org.neuclear.id.builders.NamedObjectBuilder; - import org.neuclear.id.resolver.NSResolver; - import org.neuclear.commons.time.TimeTools; - import org.neuclear.commons.crypto.Base64; import org.neuclear.commons.NeuClearException; import org.neuclear.commons.Utility; ! import org.neuclear.xml.xmlsec.XMLSecurityException; import java.io.BufferedReader; --- 1,9 ---- package org.neuclear.senders; import org.neuclear.commons.NeuClearException; import org.neuclear.commons.Utility; ! import org.neuclear.commons.crypto.Base64; ! import org.neuclear.commons.time.TimeTools; ! import org.neuclear.id.SignedNamedObject; import java.io.BufferedReader; *************** *** 26,29 **** --- 22,34 ---- * $Id$ * $Log$ + * Revision 1.11 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. + * Updated all major interfaces that used the old model to use the new model. + * * Revision 1.10 2003/11/11 21:18:43 pelle * Further vital reshuffling. *************** *** 31,54 **** * 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.9 2003/11/09 03:27:19 pelle * More house keeping and shuffling about mainly pay ! * * Revision 1.8 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.7 2003/09/29 23:17:32 pelle * Changes to the senders. Now the senders only work with NamedObjectBuilders * which are the only NamedObject representations that contain full XML. ! * * Revision 1.6 2003/09/26 23:53:10 pelle * Changes mainly in receiver and related fun. * First real neuclear stuff in the payment package. Added TransferContract and AssetControllerReceiver. ! * * Revision 1.5 2003/09/26 00:22:07 pelle * Cleanups and final changes to code for refactoring of the Verifier and Reader part. ! * * Revision 1.4 2003/09/24 23:56:48 pelle * Refactoring nearly done. New model for creating signed objects. --- 36,59 ---- * 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. ! * <p/> * Revision 1.9 2003/11/09 03:27:19 pelle * More house keeping and shuffling about mainly pay ! * <p/> * Revision 1.8 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. ! * <p/> * Revision 1.7 2003/09/29 23:17:32 pelle * Changes to the senders. Now the senders only work with NamedObjectBuilders * which are the only NamedObject representations that contain full XML. ! * <p/> * Revision 1.6 2003/09/26 23:53:10 pelle * Changes mainly in receiver and related fun. * First real neuclear stuff in the payment package. Added TransferContract and AssetControllerReceiver. ! * <p/> * Revision 1.5 2003/09/26 00:22:07 pelle * Cleanups and final changes to code for refactoring of the Verifier and Reader part. ! * <p/> * Revision 1.4 2003/09/24 23:56:48 pelle * Refactoring nearly done. New model for creating signed objects. *************** *** 56,84 **** * 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.3 2003/09/23 19:16:28 pelle * Changed NameSpace to Identity. * To cause less confusion in the future. ! * * Revision 1.2 2003/09/22 19:24:02 pelle * More fixes throughout to problems caused by renaming. ! * * Revision 1.1.1.1 2003/09/19 14:41:29 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.2 2003/02/16 00:23:05 pelle * LogSender now works and there is a corresponding server side cgi script to do the logging in * http://neuclear.org/logger/ Site is not yet up but will be soon. ! * * Revision 1.1 2003/02/14 21:10:34 pelle * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. --- 61,89 ---- * Currently still uses dom4j but that has been refactored out that it * should now be very quick to implement a xmlpull implementation. ! * <p/> * 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. ! * <p/> * Revision 1.3 2003/09/23 19:16:28 pelle * Changed NameSpace to Identity. * To cause less confusion in the future. ! * <p/> * Revision 1.2 2003/09/22 19:24:02 pelle * More fixes throughout to problems caused by renaming. ! * <p/> * Revision 1.1.1.1 2003/09/19 14:41:29 pelle * First import into the neuclear project. This was originally under the SF neuclear * project. This marks a general major refactoring and renaming ahead. ! * <p/> * 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. ! * <p/> ! * <p/> * Revision 1.2 2003/02/16 00:23:05 pelle * LogSender now works and there is a corresponding server side cgi script to do the logging in * http://neuclear.org/logger/ Site is not yet up but will be soon. ! * <p/> * Revision 1.1 2003/02/14 21:10:34 pelle * The email sender works. The LogSender and the SoapSender should work but havent been tested yet. *************** *** 86,93 **** * The Identity object also has a new method send() which allows one to send a named object to the Identity's * default receiver. - * */ public class LogSender extends Sender { ! public SignedNamedObject send(String endpoint, NamedObjectBuilder obj) throws NeuClearException { try { String digest = URLEncoder.encode(Base64.encode(obj.getDigest()), "UTF-8"); --- 91,97 ---- * The Identity object also has a new method send() which allows one to send a named object to the Identity's * default receiver. */ public class LogSender extends Sender { ! public SignedNamedObject send(String endpoint, SignedNamedObject obj) throws NeuClearException { try { String digest = URLEncoder.encode(Base64.encode(obj.getDigest()), "UTF-8"); *************** *** 105,110 **** } catch (IOException e) { Utility.rethrowException(e); - } catch (XMLSecurityException e) { - Utility.rethrowException(e); } return null;// --- 109,112 ---- *************** *** 150,154 **** public static Timestamp getTimeStamp(SignedNamedObject obj) throws NeuClearException { ! return getTimeStamp(Utility.denullString(obj.getSignatory().getLogger(), LOGGER), obj.getDigest().getBytes()); } --- 152,156 ---- public static Timestamp getTimeStamp(SignedNamedObject obj) throws NeuClearException { ! return getTimeStamp(Utility.denullString(obj.getSignatory().getLogger(), LOGGER), obj.getEncoded().getBytes()); } Index: Sender.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/Sender.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Sender.java 11 Nov 2003 21:18:43 -0000 1.10 --- Sender.java 19 Nov 2003 23:33:59 -0000 1.11 *************** *** 8,11 **** --- 8,20 ---- * $Id$ * $Log$ + * Revision 1.11 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. + * Updated all major interfaces that used the old model to use the new model. + * * Revision 1.10 2003/11/11 21:18:43 pelle * Further vital reshuffling. *************** *** 54,58 **** import org.neuclear.commons.NeuClearException; import org.neuclear.id.SignedNamedObject; - import org.neuclear.id.builders.NamedObjectBuilder; import org.neuclear.xml.XMLException; --- 63,66 ---- *************** *** 62,68 **** public abstract class Sender { ! public abstract SignedNamedObject send(String endpoint, NamedObjectBuilder obj) throws NeuClearException, XMLException; ! public static SignedNamedObject quickSend(String endpoint, NamedObjectBuilder obj) throws NeuClearException { int protloc = endpoint.indexOf(":"); if (protloc < 0) --- 70,76 ---- public abstract class Sender { ! public abstract SignedNamedObject send(String endpoint, SignedNamedObject obj) throws NeuClearException, XMLException; ! public static SignedNamedObject quickSend(String endpoint, SignedNamedObject obj) throws NeuClearException { int protloc = endpoint.indexOf(":"); if (protloc < 0) Index: SmtpSender.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/SmtpSender.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SmtpSender.java 11 Nov 2003 21:18:43 -0000 1.12 --- SmtpSender.java 19 Nov 2003 23:33:59 -0000 1.13 *************** *** 8,11 **** --- 8,20 ---- * $Id$ * $Log$ + * Revision 1.13 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. + * Updated all major interfaces that used the old model to use the new model. + * * Revision 1.12 2003/11/11 21:18:43 pelle * Further vital reshuffling. *************** *** 91,98 **** import org.neuclear.commons.NeuClearException; - import org.neuclear.id.SignedNamedObject; - import org.neuclear.id.builders.NamedObjectBuilder; import org.neuclear.commons.Utility; ! import org.neuclear.xml.XMLException; import javax.mail.*; --- 100,105 ---- import org.neuclear.commons.NeuClearException; import org.neuclear.commons.Utility; ! import org.neuclear.id.SignedNamedObject; import javax.mail.*; *************** *** 105,109 **** public class SmtpSender extends Sender { ! public SignedNamedObject send(String endpoint, NamedObjectBuilder obj) throws NeuClearException { Properties props = System.getProperties(); if (endpoint.startsWith("mailto:")) --- 112,116 ---- public class SmtpSender extends Sender { ! public SignedNamedObject send(String endpoint, SignedNamedObject obj) throws NeuClearException { Properties props = System.getProperties(); if (endpoint.startsWith("mailto:")) *************** *** 136,140 **** multi.addBodyPart(body); BodyPart objpart = new MimeBodyPart(); ! objpart.setText(obj.asXML()); objpart.setHeader("Content-type", "application/nsdl"); multi.addBodyPart(objpart); --- 143,147 ---- multi.addBodyPart(body); BodyPart objpart = new MimeBodyPart(); ! objpart.setText(obj.getEncoded()); objpart.setHeader("Content-type", "application/nsdl"); multi.addBodyPart(objpart); *************** *** 148,154 **** } catch (MessagingException e) { e.printStackTrace(); //To change body of catch statement use Options | File Templates. - Utility.rethrowException(e); - } catch (XMLException e) { - e.printStackTrace(); Utility.rethrowException(e); } --- 155,158 ---- Index: SoapSender.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/senders/SoapSender.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SoapSender.java 11 Nov 2003 21:18:43 -0000 1.11 --- SoapSender.java 19 Nov 2003 23:33:59 -0000 1.12 *************** *** 8,11 **** --- 8,20 ---- * $Id$ * $Log$ + * Revision 1.12 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. + * Updated all major interfaces that used the old model to use the new model. + * * Revision 1.11 2003/11/11 21:18:43 pelle * Further vital reshuffling. *************** *** 86,90 **** import org.neuclear.commons.NeuClearException; import org.neuclear.id.SignedNamedObject; - import org.neuclear.id.builders.NamedObjectBuilder; import org.neuclear.id.verifier.VerifyingReader; import org.neuclear.xml.XMLException; --- 95,98 ---- *************** *** 93,98 **** public class SoapSender extends Sender { ! public SignedNamedObject send(String endpoint, NamedObjectBuilder obj) throws NeuClearException, XMLException { ! return VerifyingReader.getInstance().read(SOAPTools.soapRequest(endpoint, obj.getElement(), "/receive")); } --- 101,106 ---- public class SoapSender extends Sender { ! public SignedNamedObject send(String endpoint, SignedNamedObject obj) throws NeuClearException, XMLException { ! return VerifyingReader.getInstance().read(SOAPTools.soapRequest(endpoint, obj.getEncoded(), "/receive")); } |
|
From: <pe...@us...> - 2003-11-19 23:34:43
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv12836/src/java/org/neuclear/receiver
Modified Files:
Receiver.java
Removed Files:
RawReceiver.java
Log Message:
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.
Updated all major interfaces that used the old model to use the new model.
Index: Receiver.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/receiver/Receiver.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Receiver.java 11 Nov 2003 21:18:43 -0000 1.11
--- Receiver.java 19 Nov 2003 23:33:59 -0000 1.12
***************
*** 9,12 ****
--- 9,21 ----
* $Id$
* $Log$
+ * Revision 1.12 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.
+ * Updated all major interfaces that used the old model to use the new model.
+ *
* Revision 1.11 2003/11/11 21:18:43 pelle
* Further vital reshuffling.
***************
*** 88,91 ****
--- 97,101 ----
*/
+ import org.neuclear.commons.NeuClearException;
import org.neuclear.id.SignedNamedObject;
***************
*** 104,107 ****
* @throws UnsupportedTransaction
*/
! org.neuclear.xml.ElementProxy receive(SignedNamedObject obj) throws UnsupportedTransaction;
}
--- 114,117 ----
* @throws UnsupportedTransaction
*/
! org.neuclear.xml.ElementProxy receive(SignedNamedObject obj) throws UnsupportedTransaction, NeuClearException;
}
--- RawReceiver.java DELETED ---
|
|
From: <pe...@us...> - 2003-11-19 23:34:42
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv12836/src/java/org/neuclear/id/verifier
Modified Files:
VerifyingReader.java
Log Message:
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.
Updated all major interfaces that used the old model to use the new model.
Index: VerifyingReader.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier/VerifyingReader.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** VerifyingReader.java 18 Nov 2003 00:01:55 -0000 1.9
--- VerifyingReader.java 19 Nov 2003 23:33:59 -0000 1.10
***************
*** 6,10 ****
import org.neuclear.auth.AuthenticationTicket;
import org.neuclear.commons.NeuClearException;
- import org.neuclear.commons.crypto.CryptoTools;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.id.*;
--- 6,9 ----
***************
*** 39,42 ****
--- 38,50 ----
$Id$
$Log$
+ Revision 1.10 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.
+ Updated all major interfaces that used the old model to use the new model.
+
Revision 1.9 2003/11/18 00:01:55 pelle
The sample signing web application for logging in and out is now working.
***************
*** 120,127 ****
Identity signatory = NSResolver.resolveIdentity(signatoryName);
if (XMLSecTools.verifySignature(elem, signatory.getPublicKey())) {
- //I should be able to get this from within. This is just a quick hack.
- String digest = new String(CryptoTools.digest(XMLSecTools.canonicalize(elem)));
Timestamp timestamp = TimeTools.parseTimeStamp(elem.attributeValue("timestamp"));
! return resolveReader(elem).read(elem, name, signatory, digest, timestamp);
} else
throw new InvalidNamedObject(name + " isnt valid");
--- 128,133 ----
Identity signatory = NSResolver.resolveIdentity(signatoryName);
if (XMLSecTools.verifySignature(elem, signatory.getPublicKey())) {
Timestamp timestamp = TimeTools.parseTimeStamp(elem.attributeValue("timestamp"));
! return resolveReader(elem).read(elem, name, signatory, new String(XMLSecTools.canonicalize(elem)), timestamp);
} else
throw new InvalidNamedObject(name + " isnt valid");
|
|
From: <pe...@us...> - 2003-11-19 23:34:41
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/auth
In directory sc8-pr-cvs1:/tmp/cvs-serv12836/src/java/org/neuclear/auth
Modified Files:
AuthenticationTicket.java
Log Message:
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.
Updated all major interfaces that used the old model to use the new model.
Index: AuthenticationTicket.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/auth/AuthenticationTicket.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AuthenticationTicket.java 11 Nov 2003 21:18:42 -0000 1.2
--- AuthenticationTicket.java 19 Nov 2003 23:33:58 -0000 1.3
***************
*** 13,20 ****
import org.dom4j.Namespace;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
import org.neuclear.id.NamedObjectReader;
import org.neuclear.id.SignedNamedObject;
- import org.neuclear.commons.time.TimeTools;
import org.neuclear.xml.xmlsec.XMLSecurityException;
--- 13,20 ----
import org.dom4j.Namespace;
import org.neuclear.commons.NeuClearException;
+ import org.neuclear.commons.time.TimeTools;
import org.neuclear.id.Identity;
import org.neuclear.id.NamedObjectReader;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.xml.xmlsec.XMLSecurityException;
***************
*** 38,42 ****
* @param signatory
* @param timestamp
! * @param digest
* @param requester
* @param validto
--- 38,42 ----
* @param signatory
* @param timestamp
! * @param encoded
* @param requester
* @param validto
***************
*** 44,49 ****
* @throws NeuClearException
*/
! private AuthenticationTicket(String name, Identity signatory, Timestamp timestamp, String digest, String requester, Timestamp validto, String siteurl) throws NeuClearException {
! super(name, signatory, timestamp, digest);
this.validTo = validto;
this.siteurl = siteurl;
--- 44,49 ----
* @throws NeuClearException
*/
! private AuthenticationTicket(String name, Identity signatory, Timestamp timestamp, String encoded, String requester, Timestamp validto, String siteurl) throws NeuClearException {
! super(name, signatory, timestamp, encoded);
this.validTo = validto;
this.siteurl = siteurl;
|