* 2005-07-27 0.6 released
2005-07-27 jrandom * Enabled SSU as the default top priority transport, adjusting the config.jsp page accordingly. * Add verification fields to the SSU and TCP connection negotiation (not compatible with previous builds) * Enable the backwards incompatible tunnel crypto change as documented in tunnel-alt.html (have each hop encrypt the received IV before using it, then encrypt it again before sending it on) * Disable the I2CP encryption, leaving in place the end to end garlic encryption (another backwards incompatible change) * Adjust the protocol versions on the TCP and SSU transports so that they won't talk to older routers. * Fix up the config stats handling again * Fix a rare off-by-one in the SSU fragmentation * Reduce some unnecessary netDb resending by inluding the peers queried successfully in the store redundancy count.
This commit is contained in:
@ -14,8 +14,8 @@ package net.i2p;
|
||||
*
|
||||
*/
|
||||
public class CoreVersion {
|
||||
public final static String ID = "$Revision: 1.34 $ $Date: 2005/04/06 10:43:26 $";
|
||||
public final static String VERSION = "0.5.0.7";
|
||||
public final static String ID = "$Revision: 1.35 $ $Date: 2005/04/20 15:14:20 $";
|
||||
public final static String VERSION = "0.6";
|
||||
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Core version: " + VERSION);
|
||||
|
@ -121,7 +121,7 @@ class I2CPMessageProducer {
|
||||
* garlic crypto added by the router)
|
||||
*
|
||||
*/
|
||||
static final boolean END_TO_END_CRYPTO = true;
|
||||
static final boolean END_TO_END_CRYPTO = false;
|
||||
|
||||
/**
|
||||
* Create a new signed payload and send it off to the destination
|
||||
|
@ -260,7 +260,10 @@ public class DHSessionKeyBuilder {
|
||||
*
|
||||
*/
|
||||
public byte[] getMyPublicValueBytes() {
|
||||
BigInteger bi = getMyPublicValue();
|
||||
return toByteArray(getMyPublicValue());
|
||||
}
|
||||
|
||||
private static final byte[] toByteArray(BigInteger bi) {
|
||||
byte data[] = bi.toByteArray();
|
||||
byte rv[] = new byte[256];
|
||||
if (data.length == 257) // high byte has the sign bit
|
||||
@ -299,6 +302,9 @@ public class DHSessionKeyBuilder {
|
||||
public BigInteger getPeerPublicValue() {
|
||||
return _peerValue;
|
||||
}
|
||||
public byte[] getPeerPublicValueBytes() {
|
||||
return toByteArray(getPeerPublicValue());
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the session key, calculating it if necessary (and if possible).
|
||||
|
@ -225,4 +225,4 @@ public class BufferedRandomSource extends RandomSource {
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,9 +25,13 @@ public class DHSessionKeyBuilderTest extends TestCase {
|
||||
DHSessionKeyBuilder builder1 = new DHSessionKeyBuilder();
|
||||
DHSessionKeyBuilder builder2 = new DHSessionKeyBuilder();
|
||||
BigInteger pub1 = builder1.getMyPublicValue();
|
||||
builder2.setPeerPublicValue(pub1);
|
||||
BigInteger pub2 = builder2.getMyPublicValue();
|
||||
builder1.setPeerPublicValue(pub2);
|
||||
try {
|
||||
builder2.setPeerPublicValue(pub1);
|
||||
builder1.setPeerPublicValue(pub2);
|
||||
} catch (DHSessionKeyBuilder.InvalidPublicParameterException ippe) {
|
||||
assertTrue(ippe.getMessage(), true);
|
||||
}
|
||||
SessionKey key1 = builder1.getSessionKey();
|
||||
SessionKey key2 = builder2.getSessionKey();
|
||||
|
||||
@ -44,4 +48,4 @@ public class DHSessionKeyBuilderTest extends TestCase {
|
||||
assertEquals(origVal, tranVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,9 +30,9 @@ import net.i2p.util.Log;
|
||||
public class MessagePayloadMessageTest extends StructureTest {
|
||||
public DataStructure createDataStructure() throws DataFormatException {
|
||||
MessagePayloadMessage msg = new MessagePayloadMessage();
|
||||
msg.setMessageId((MessageId)(new MessageIdTest()).createDataStructure());
|
||||
msg.setMessageId(123);
|
||||
msg.setPayload((Payload)(new PayloadTest()).createDataStructure());
|
||||
msg.setSessionId((SessionId)(new SessionIdTest()).createDataStructure());
|
||||
msg.setSessionId(321);
|
||||
return msg;
|
||||
}
|
||||
public DataStructure createStructureToRead() { return new MessagePayloadMessage(); }
|
||||
@ -56,4 +56,4 @@ import net.i2p.util.Log;
|
||||
assertEquals(orig, ds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -22,8 +22,8 @@ import net.i2p.data.i2cp.SessionId;
|
||||
public class MessageStatusMessageTest extends StructureTest {
|
||||
public DataStructure createDataStructure() throws DataFormatException {
|
||||
MessageStatusMessage msg = new MessageStatusMessage();
|
||||
msg.setSessionId((SessionId)(new SessionIdTest()).createDataStructure());
|
||||
msg.setMessageId((MessageId)(new MessageIdTest()).createDataStructure());
|
||||
msg.setSessionId(42);
|
||||
msg.setMessageId(41);
|
||||
msg.setSize(1024*1024*42L);
|
||||
msg.setStatus(MessageStatusMessage.STATUS_AVAILABLE);
|
||||
msg.setNonce(1);
|
||||
|
@ -22,8 +22,8 @@ import net.i2p.data.i2cp.SessionId;
|
||||
public class ReceiveMessageBeginMessageTest extends StructureTest {
|
||||
public DataStructure createDataStructure() throws DataFormatException {
|
||||
ReceiveMessageBeginMessage msg = new ReceiveMessageBeginMessage();
|
||||
msg.setSessionId((SessionId)(new SessionIdTest()).createDataStructure());
|
||||
msg.setMessageId((MessageId)(new MessageIdTest()).createDataStructure());
|
||||
msg.setSessionId(321);
|
||||
msg.setMessageId(123);
|
||||
return msg;
|
||||
}
|
||||
public DataStructure createStructureToRead() { return new ReceiveMessageBeginMessage(); }
|
||||
|
@ -22,8 +22,8 @@ import net.i2p.data.i2cp.SessionId;
|
||||
public class ReceiveMessageEndMessageTest extends StructureTest {
|
||||
public DataStructure createDataStructure() throws DataFormatException {
|
||||
ReceiveMessageEndMessage msg = new ReceiveMessageEndMessage();
|
||||
msg.setSessionId((SessionId)(new SessionIdTest()).createDataStructure());
|
||||
msg.setMessageId((MessageId)(new MessageIdTest()).createDataStructure());
|
||||
msg.setSessionId(321);
|
||||
msg.setMessageId(123);
|
||||
return msg;
|
||||
}
|
||||
public DataStructure createStructureToRead() { return new ReceiveMessageEndMessage(); }
|
||||
|
Reference in New Issue
Block a user