[freenet-cvs] r15501 - trunk/freenet/src/freenet/node

nextgens at freenetproject.org nextgens at freenetproject.org
Tue Oct 23 15:49:35 UTC 2007


Author: nextgens
Date: 2007-10-23 15:49:35 +0000 (Tue, 23 Oct 2007)
New Revision: 15501

Modified:
   trunk/freenet/src/freenet/node/FNPPacketMangler.java
Log:
logging

Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java	2007-10-23 15:48:01 UTC (rev 15500)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java	2007-10-23 15:49:35 UTC (rev 15501)
@@ -783,6 +783,10 @@
 		inputOffset += HASH_LENGTH;
 		
 		DiffieHellmanLightContext ctx = findContextByExponential(_ourExponential);
+		if(ctx == null) {
+			Logger.error(this, "WTF? the HMAC verified but we don't know about that exponential! SHOULDN'T HAPPEN!");
+			return;
+		}
 		BigInteger computedExponential = ctx.getHMACKey(_hisExponential, Global.DHgroupA);
 		byte[] Ks = computeJFKSharedKey(computedExponential, nonceInitiator, nonceResponder, "0");
 		byte[] Ke = computeJFKSharedKey(computedExponential, nonceInitiator, nonceResponder, "1");




More information about the cvs mailing list