[Webfunds-commits] java/webfunds/sox Account.java AccountId.java MailItem.java SubAccount.java
Ian Grigg
iang@cypherpunks.ai
Tue, 20 Jun 2000 05:57:37 -0400 (AST)
iang 00/06/20 05:57:37
Modified: webfunds/client/sox SOXWallet.java StoreAccountStore.java
webfunds/sox Account.java AccountId.java MailItem.java
SubAccount.java
Log:
checkpoint for next release 1.6.0
Revision Changes Path
1.123 +4 -3 java/webfunds/client/sox/SOXWallet.java
Index: SOXWallet.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/sox/SOXWallet.java,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- SOXWallet.java 2000/06/18 21:57:17 1.122
+++ SOXWallet.java 2000/06/20 09:57:35 1.123
@@ -1,4 +1,4 @@
-/* $Id: SOXWallet.java,v 1.122 2000/06/18 21:57:17 iang Exp $
+/* $Id: SOXWallet.java,v 1.123 2000/06/20 09:57:35 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-2000 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -1719,7 +1719,8 @@
MailId[] confirms = new MailId[newConfirms.size()];
newConfirms.copyInto(confirms);
- logmsg("have " + confirms.length + " MailIds ready to confirm");
+ logmsg("have " + confirms.length + " MailIds ready to confirm for " +
+ sub.fp());
return confirms ;
}
@@ -1773,7 +1774,7 @@
receiptStore.addReceipt(rec, acct);
} catch (StoreException ex) {
ex.printStackTrace();
- logmsg("losing receipts: " + ex);
+ logmsg("losing receipts for " + acct.fp() + ": " + ex);
return false ; // must not confirm !!!!
}
1.19 +10 -1 java/webfunds/client/sox/StoreAccountStore.java
Index: StoreAccountStore.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/sox/StoreAccountStore.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- StoreAccountStore.java 2000/05/27 03:06:15 1.18
+++ StoreAccountStore.java 2000/06/20 09:57:36 1.19
@@ -1,5 +1,5 @@
/*
- * $Id: StoreAccountStore.java,v 1.18 2000/05/27 03:06:15 iang Exp $
+ * $Id: StoreAccountStore.java,v 1.19 2000/06/20 09:57:36 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -76,6 +76,9 @@
public void addAccount(Account acct)
throws StoreException
{
+ if (acct == null)
+ throw new RuntimeException("getAccount(null)");
+
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
acct.encode(baos);
@@ -91,6 +94,9 @@
public void deleteAccount(Account acct)
throws StoreException
{
+ if (acct == null)
+ throw new RuntimeException("getAccount(null)");
+
String key = Hex.data2hex(acct.getId().getId());
store.remove(key);
if (store.checkErrors())
@@ -102,6 +108,9 @@
public Account getAccount(AccountId acct)
throws StoreException
{
+ if (acct == null)
+ throw new RuntimeException("getAccount(null)");
+
logmsg("get " + acct);
String key = Hex.data2hex(acct.getId());
Object obj = store.get(key);
1.66 +3 -1 java/webfunds/sox/Account.java
Index: Account.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/Account.java,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- Account.java 2000/06/04 19:55:23 1.65
+++ Account.java 2000/06/20 09:57:36 1.66
@@ -1,5 +1,5 @@
/*
- * $Id: Account.java,v 1.65 2000/06/04 19:55:23 gelderen Exp $
+ * $Id: Account.java,v 1.66 2000/06/20 09:57:36 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -521,6 +521,8 @@
retval += "\tPrivate: "+key;
return retval;
}
+
+ public String fp() { return id.fp(); }
public static Account example()
{
1.16 +10 -10 java/webfunds/sox/AccountId.java
Index: AccountId.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/AccountId.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- AccountId.java 2000/06/04 19:55:23 1.15
+++ AccountId.java 2000/06/20 09:57:36 1.16
@@ -1,4 +1,4 @@
-/* $Id: AccountId.java,v 1.15 2000/06/04 19:55:23 gelderen Exp $
+/* $Id: AccountId.java,v 1.16 2000/06/20 09:57:36 iang Exp $
*
* Copyright (c) Systemics Inc. 1995-2000 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -15,7 +15,7 @@
* This class represents an Account identifier,
* which is the standard way of referring to an account.
*
- * @version $Revision: 1.15 $
+ * @version $Revision: 1.16 $
*/
public class AccountId extends Id
{
@@ -33,14 +33,14 @@
- // who uses these?
- public AccountId(X509Cert cert)
- throws InvalidKeyException
- {
- super();
-System.err.println("DEPRECATED AccountId(cert)????");
- id = Crypto.fingerprint(Crypto.getPublicKeyFromCert(cert));
- }
+// // who uses these?
+// public AccountId(X509Cert cert)
+// throws InvalidKeyException
+// {
+// super();
+//System.err.println("DEPRECATED AccountId(cert)????");
+// id = Crypto.fingerprint(Crypto.getPublicKeyFromCert(cert));
+// }
public AccountId(PublicKey pk)
throws InvalidKeyException
1.6 +4 -3 java/webfunds/sox/MailItem.java
Index: MailItem.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/MailItem.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- MailItem.java 2000/06/18 21:07:26 1.5
+++ MailItem.java 2000/06/20 09:57:36 1.6
@@ -1,5 +1,5 @@
/*
- * $Id: MailItem.java,v 1.5 2000/06/18 21:07:26 iang Exp $
+ * $Id: MailItem.java,v 1.6 2000/06/20 09:57:36 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -59,6 +59,7 @@
/** the Message component is to be recovered according to Type */
public byte[] getMessage() { return msg; }
public int getType() { return type; }
+ /** this is the hash of the MailItem that represents the signature */
public MailId getMailId() { return MailId.newInstance(buf); }
@@ -122,7 +123,7 @@
//
- // Only way to build an old one.
+ // Only way to build an old Receipt in a Mailbuf?
//
public void init(byte[] oldBuf)
throws SOXPacketException
@@ -230,7 +231,7 @@
String s = "";
s += "V" + version;
s += " Type: " + type;
- s += "Item: " + Hex.quick(msg);
+ s += " Item: " + Hex.quick(msg);
return s ;
}
1.22 +4 -1 java/webfunds/sox/SubAccount.java
Index: SubAccount.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/SubAccount.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- SubAccount.java 2000/06/11 22:30:43 1.21
+++ SubAccount.java 2000/06/20 09:57:36 1.22
@@ -1,5 +1,5 @@
/*
- * $Id: SubAccount.java,v 1.21 2000/06/11 22:30:43 iang Exp $
+ * $Id: SubAccount.java,v 1.22 2000/06/20 09:57:36 iang Exp $
*
* Copyright (c) Systemics Ltd 1995-1999 on behalf of
* the WebFunds Development Team. All Rights Reserved.
@@ -44,6 +44,7 @@
public Account getAccount() { return acct; }
+
/**
* The request number (for this session)
*/
@@ -445,6 +446,8 @@
retval += "\tAccount = " + (acct == null ? "<null>" : ""+acct.getId());
return retval;
}
+
+ public String fp() { return acct.getId().fp() + " / " + itemId.fp(); }
public boolean equals(java.lang.Object obj)
{