Author: toad
Date: 2006-01-10 13:45:40 +0000 (Tue, 10 Jan 2006)
New Revision: 7832
Modified:
trunk/freenet/src/freenet/keys/Key.java
trunk/freenet/src/freenet/keys/NodeCHK.java
trunk/freenet/src/freenet/keys/NodeSSK.java
trunk/freenet/src/freenet/node/Version.java
Log:
337:
Fix dumb bug that was preventing us from parsing keys and therefore broke all
requests and inserts.
Modified: trunk/freenet/src/freenet/keys/Key.java
===================================================================
--- trunk/freenet/src/freenet/keys/Key.java 2006-01-09 16:18:47 UTC (rev
7831)
+++ trunk/freenet/src/freenet/keys/Key.java 2006-01-10 13:45:40 UTC (rev
7832)
@@ -54,8 +54,9 @@
public static final Key read(DataInput raf) throws IOException {
short type = raf.readShort();
if(type == NodeCHK.TYPE) {
- return NodeCHK.read(raf);
- }
+ return NodeCHK.readCHK(raf);
+ } else if(type == NodeSSK.TYPE)
+ return NodeSSK.readSSK(raf);
throw new IOException("Unrecognized format: "+type);
}
Modified: trunk/freenet/src/freenet/keys/NodeCHK.java
===================================================================
--- trunk/freenet/src/freenet/keys/NodeCHK.java 2006-01-09 16:18:47 UTC (rev
7831)
+++ trunk/freenet/src/freenet/keys/NodeCHK.java 2006-01-10 13:45:40 UTC (rev
7832)
@@ -4,11 +4,8 @@
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.io.IOException;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
import freenet.support.Base64;
-import freenet.support.Fields;
/**
* @author amphibian
Modified: trunk/freenet/src/freenet/keys/NodeSSK.java
===================================================================
--- trunk/freenet/src/freenet/keys/NodeSSK.java 2006-01-09 16:18:47 UTC (rev
7831)
+++ trunk/freenet/src/freenet/keys/NodeSSK.java 2006-01-10 13:45:40 UTC (rev
7832)
@@ -50,7 +50,7 @@
}
// 01 = SSK, 01 = first version of SSK
- public short TYPE = 0x0201;
+ public static short TYPE = 0x0201;
public void write(DataOutput _index) throws IOException {
_index.writeShort(TYPE);
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-01-09 16:18:47 UTC (rev
7831)
+++ trunk/freenet/src/freenet/node/Version.java 2006-01-10 13:45:40 UTC (rev
7832)
@@ -20,10 +20,10 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- public static final int buildNumber = 336;
+ public static final int buildNumber = 337;
/** Oldest build of Fred we will talk to */
- public static final int lastGoodBuild = 332;
+ public static final int lastGoodBuild = 337;
/** The highest reported build of fred */
public static int highestSeenBuild = buildNumber;