forked from I2P_Developers/i2p.i2p
* SSU: Fix corruption of introducer keys
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2014-03-16 zzz
|
||||
* SSU: Fix corruption of introducer keys
|
||||
|
||||
2014-03-15 zzz
|
||||
* Certificate: Fix null cert hash code
|
||||
* Hash: Cleanup of cached hash
|
||||
|
@@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 20;
|
||||
public final static long BUILD = 21;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "-rc";
|
||||
|
@@ -1108,7 +1108,10 @@ class PacketBuilder {
|
||||
SessionKey cipherKey = null;
|
||||
SessionKey macKey = null;
|
||||
// first look up by ikey, it is equal to router hash for now
|
||||
PeerState bobState = transport.getPeerState(Hash.create(ikey));
|
||||
PeerState bobState = null;
|
||||
if (ikey.length == Hash.HASH_LENGTH) {
|
||||
bobState = transport.getPeerState(new Hash(ikey));
|
||||
}
|
||||
if (bobState == null) {
|
||||
RemoteHostId rhid = new RemoteHostId(iaddr.getAddress(), iport);
|
||||
bobState = transport.getPeerState(rhid);
|
||||
|
@@ -1360,7 +1360,10 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
int valid = 0;
|
||||
for (int i = 0; i < ua.getIntroducerCount(); i++) {
|
||||
// warning: this is only valid as long as we use the ident hash as their key.
|
||||
PeerState peer = getPeerState(Hash.create(ua.getIntroducerKey(i)));
|
||||
byte[] key = ua.getIntroducerKey(i);
|
||||
if (key.length != Hash.HASH_LENGTH)
|
||||
continue;
|
||||
PeerState peer = getPeerState(new Hash(key));
|
||||
if (peer != null)
|
||||
valid++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user