Update of /cvsroot/freenet/freenet/src/freenet/session
In directory sc8-pr-cvs1:/tmp/cvs-serv31742/src/freenet/session
Modified Files:
FnpLink.java FnpLinkManager.java
Log Message:
Fix more new BigInteger(<bytes>) problems from hirvox's work, and some Logger warnings.
Index: FnpLink.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/session/FnpLink.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -w -r1.35 -r1.36
--- FnpLink.java 30 Oct 2003 15:27:38 -0000 1.35
+++ FnpLink.java 31 Oct 2003 18:03:27 -0000 1.36
@@ -508,7 +508,7 @@
byte[] Cbbytes = Util.MPIbytes(Cb);
ctx.update(Cabytes, 0, Cabytes.length);
ctx.update(Cbbytes, 0, Cbbytes.length);
- BigInteger M = new BigInteger(ctx.digest());
+ BigInteger M = new BigInteger(1, ctx.digest());
DSASignature sigCaCb = DSA.sign(pubMe.getGroup(), privMe,
M, Core.getRandSource());
@@ -523,7 +523,7 @@
ctx.update(Yabytes, 0, Yabytes.length);
ctx.update(Cabytes, 0, Cabytes.length);
ctx.update(Cbbytes, 0, Cbbytes.length);
- M = new BigInteger(ctx.digest());
+ M = new BigInteger(1, ctx.digest());
DSASignature sigYaCaCb = DSASignature.read(in);
if (!DSA.verify(Ya, sigYaCaCb, M)) {
String err = "Remote does not posess the private key to the public key it"+
@@ -661,7 +661,7 @@
ctx.update(Yabytes, 0, Yabytes.length);
ctx.update(Cabytes, 0, Cabytes.length);
ctx.update(Cbbytes, 0, Cbbytes.length);
- M = new BigInteger(ctx.digest());
+ M = new BigInteger(1, ctx.digest());
DSASignature sigYaCaCb = DSA.sign(pubMe.getGroup(), privMe, M,
Core.getRandSource());
@@ -695,7 +695,7 @@
ctx.update(Cabytes, 0, Cabytes.length);
ctx.update(Cbbytes, 0, Cbbytes.length);
- M = new BigInteger(ctx.digest());
+ M = new BigInteger(1, ctx.digest());
if (!DSA.verify(bob, sigCaCb, M)) {
String err = "Remote is not who she claims to be, or did not "+
"receive the correct DH parameters";
Index: FnpLinkManager.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/session/FnpLinkManager.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -w -r1.21 -r1.22
--- FnpLinkManager.java 30 Oct 2003 15:27:38 -0000 1.21
+++ FnpLinkManager.java 31 Oct 2003 18:03:27 -0000 1.22
@@ -15,7 +15,6 @@
import freenet.crypt.DiffieHellman;
import freenet.crypt.Digest;
import freenet.crypt.SHA1;
-import freenet.crypt.Util;
import freenet.support.Logger;
/**
@@ -79,7 +78,7 @@
boolean logDEBUG = Core.logger.shouldLog(Logger.DEBUG,this);
if(logDEBUG)
Core.logger.log(this, "createOutgoing() at "+startTime,
- Core.logger.DEBUG);
+ Logger.DEBUG);
synchronized(currentLock) {
currentNegotiations++;
// Don't stop outgoing negotiations because of negotiation limit
@@ -89,7 +88,7 @@
long negUpLen = negUpTime - startTime;
if(logDEBUG || negUpLen>500)
Core.logger.log(this, "currentNegotiations up took "+negUpLen,
- negUpLen>500?Core.logger.MINOR:Core.logger.DEBUG);
+ negUpLen>500?Logger.MINOR:Logger.DEBUG);
long solicitTime;
try {
@@ -110,7 +109,7 @@
if(logDEBUG || solicitLength > 1000)
Core.logger.log(this, "solicit() took "+solicitLength+" at "+
solicitTime, solicitLength>1000?
- Core.logger.MINOR : Core.logger.DEBUG);
+ Logger.MINOR : Logger.DEBUG);
Core.diagnostics.occurrenceContinuous("authorizeTime",
solicitTime - negUpTime);
return l;
@@ -176,13 +175,13 @@
removeLink(oldLt);
}
- BigInteger linkIdentifier=new BigInteger(hk);
+ BigInteger linkIdentifier=new BigInteger(1, hk);
LinkToken lt=new FnpLinkToken(remotePK, me, k, linkIdentifier);
//Core.logger.log(this, "Adding link identified by "
// + linkIdentifier.toString(16), Core.logger.DEBUG);
if(Core.logger.shouldLog(Logger.DEBUG,this)) Core.logger.log(this, "Adding
link to peer " + remotePK,
- Core.logger.DEBUG);
+ Logger.DEBUG);
Core.diagnostics.occurrenceCounting("liveLinks", 1);
synchronized (this) {
activeLinks.put(new IdKey(linkIdentifier), lt);
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs