Author: toad
Date: 2006-11-29 00:46:41 +0000 (Wed, 29 Nov 2006)
New Revision: 11101
Modified:
trunk/freenet/src/freenet/node/PeerNode.java
Log:
Require a DSA group and DSA pubkey in *any* reference passed into PeerNode.
Remove old back compat hack to deal with builds < 970 changing the signature
calculation.
Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java 2006-11-29 00:44:13 UTC
(rev 11100)
+++ trunk/freenet/src/freenet/node/PeerNode.java 2006-11-29 00:46:41 UTC
(rev 11101)
@@ -398,13 +398,13 @@
try {
SimpleFieldSet sfs = fs.subset("dsaGroup");
if(sfs == null)
- this.peerCryptoGroup = null;
+ throw new FSParseException("No dsaGroup - very old
reference?");
else
this.peerCryptoGroup = DSAGroup.create(sfs);
sfs = fs.subset("dsaPubKey");
if(sfs == null || peerCryptoGroup == null)
- this.peerPubKey = null;
+ throw new FSParseException("No dsaPubKey - very old
reference?");
else
this.peerPubKey = DSAPublicKey.create(sfs,
peerCryptoGroup);
@@ -423,8 +423,7 @@
Logger.error(this, "The integrity of
the reference has been compromized!"+errCause);
this.isSignatureVerificationSuccessfull
= false;
fs.put("sig", signature);
-
if(Version.getArbitraryBuildNumber(version)>970) // TODO: REMOVE: the backward
compat. kludge : version checking
- throw new
ReferenceSignatureVerificationException("The integrity of the reference has
been compromized!"+errCause);
+ throw new
ReferenceSignatureVerificationException("The integrity of the reference has
been compromized!"+errCause);
}else
this.isSignatureVerificationSuccessfull
= true;
} catch (UnsupportedEncodingException e) {