Author: nextgens
Date: 2008-11-11 23:23:34 +0000 (Tue, 11 Nov 2008)
New Revision: 23499
Modified:
trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
if the hmac is OK there is no need to try an other keyTracker: we can dump the
message
Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java 2008-11-11
23:06:56 UTC (rev 23498)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java 2008-11-11
23:23:34 UTC (rev 23499)
@@ -1322,7 +1322,7 @@
long bootID = Fields.bytesToLong(data);
if(data.length - 8 < 0) {
Logger.error(this, "No space for hisRef:
data.length="+data.length+"
myRef.length="+(pn.jfkMyRef==null?0:pn.jfkMyRef.length)+" orig data length
"+(payload.length-inputOffset));
- return false;
+ return true;
}
byte[] hisRef = new byte[data.length - 8];
System.arraycopy(data, 8, hisRef, 0, hisRef.length);
@@ -1343,7 +1343,7 @@
if(!DSA.verify(pn.peerPubKey, remoteSignature, new
NativeBigInteger(1, messageHash), false)) {
String error = "The signature verification has failed!!
JFK(4) -"+pn.getPeer()+" message hash "+HexUtil.bytesToHex(messageHash)+"
length "+locallyGeneratedText.length+" hisRef "+hisRef.length+" hash
"+Fields.hashCode(hisRef)+" myRef "+pn.jfkMyRef.length+" hash
"+Fields.hashCode(pn.jfkMyRef)+" boot ID "+bootID;
Logger.error(this, error);
- return false;
+ return true;
}
// Promote if necessary
@@ -1352,7 +1352,7 @@
OpennetManager opennet = node.getOpennet();
if(opennet == null) {
Logger.normal(this, "Dumping incoming
old-opennet peer as opennet just turned off: "+pn+".");
- return false;
+ return true;
}
if(!opennet.wantPeer(pn, true)) {
Logger.normal(this, "No longer want peer "+pn+"
- dumping it after connecting");
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs