Author: nextgens
Date: 2007-12-05 10:24:15 +0000 (Wed, 05 Dec 2007)
New Revision: 16304

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

Modified: trunk/freenet/src/freenet/node/FNPPacketMangler.java
===================================================================
--- trunk/freenet/src/freenet/node/FNPPacketMangler.java        2007-12-05 
10:20:58 UTC (rev 16303)
+++ trunk/freenet/src/freenet/node/FNPPacketMangler.java        2007-12-05 
10:24:15 UTC (rev 16304)
@@ -961,7 +961,7 @@
                // is it cheaper to wait for the lock on authenticatorCache or 
to verify the hmac ?
                HMAC mac = new HMAC(SHA256.getInstance());
                if(!mac.verify(getTransientKey(), 
assembleJFKAuthenticator(responderExponential, initiatorExponential, 
nonceResponder, nonceInitiator, replyTo.getAddress().getAddress()) , 
authenticator)) {
-                       Logger.error(this, "The HMAC doesn't match; let's 
discard the packet (either we rekeyed or we are victim of forgery)");
+                       Logger.error(this, "The HMAC doesn't match; let's 
discard the packet (either we rekeyed or we are victim of forgery) - JFK3");
                        return;
                }
                // Check try to find the authenticator in the cache.
@@ -986,7 +986,7 @@

                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!");
+                       Logger.error(this, "WTF? the HMAC verified but we don't 
know about that exponential! SHOULDN'T HAPPEN! - JFK4");
                        return;
                }
                BigInteger computedExponential = 
ctx.getHMACKey(_hisExponential, Global.DHgroupA);


Reply via email to