|
From: <pe...@us...> - 2003-11-21 04:43:07
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/java/org/neuclear/asset/receiver
Modified Files:
AssetControllerReceiver.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AssetControllerReceiver.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/receiver/AssetControllerReceiver.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AssetControllerReceiver.java 11 Nov 2003 21:17:19 -0000 1.4
--- AssetControllerReceiver.java 21 Nov 2003 04:43:04 -0000 1.5
***************
*** 16,19 ****
--- 16,20 ----
import org.neuclear.commons.crypto.signers.Signer;
import org.neuclear.commons.crypto.CryptoException;
+ import org.neuclear.commons.NeuClearException;
import org.neuclear.xml.ElementProxy;
import org.neuclear.xml.xmlsec.XMLSecurityException;
***************
*** 44,50 ****
* Time: 3:03:03 PM
*/
! public class AssetControllerReceiver implements Receiver {
! public AssetControllerReceiver(AssetController proc, Signer signer) {
this.proc = proc;
this.signer = signer;
--- 45,51 ----
* Time: 3:03:03 PM
*/
! public final class AssetControllerReceiver implements Receiver {
! public AssetControllerReceiver(final AssetController proc, final Signer signer) {
this.proc = proc;
this.signer = signer;
***************
*** 57,68 ****
* @throws UnsupportedTransaction
*/
! public final ElementProxy receive(SignedNamedObject obj) throws UnsupportedTransaction {
if (obj instanceof AssetTransactionContract) {
! TransferContract transfer = (TransferContract) obj;
if (!proc.canProcess(transfer.getAsset()))
throw new UnsupportedTransaction(obj);
try {
! NamedObjectBuilder sigReceipt = proc.process(transfer);
sigReceipt.sign(transfer.getAsset().getName(), signer);
return sigReceipt;
--- 58,69 ----
* @throws UnsupportedTransaction
*/
! public final ElementProxy receive(final SignedNamedObject obj) throws UnsupportedTransaction {
if (obj instanceof AssetTransactionContract) {
! final TransferContract transfer = (TransferContract) obj;
if (!proc.canProcess(transfer.getAsset()))
throw new UnsupportedTransaction(obj);
try {
! final NamedObjectBuilder sigReceipt = proc.process(transfer);
sigReceipt.sign(transfer.getAsset().getName(), signer);
return sigReceipt;
***************
*** 78,81 ****
--- 79,84 ----
e.printStackTrace(); //TODO Handle exception
} catch (CryptoException e) {
+ e.printStackTrace(); //TODO Handle exception
+ } catch (NeuClearException e) {
e.printStackTrace(); //TODO Handle exception
}
|