Author: toad
Date: 2007-03-05 21:51:04 +0000 (Mon, 05 Mar 2007)
New Revision: 11984

Modified:
   trunk/freenet/src/freenet/keys/ClientSSK.java
Log:
Check hash on assigning pubkey

Modified: trunk/freenet/src/freenet/keys/ClientSSK.java
===================================================================
--- trunk/freenet/src/freenet/keys/ClientSSK.java       2007-03-05 21:26:59 UTC 
(rev 11983)
+++ trunk/freenet/src/freenet/keys/ClientSSK.java       2007-03-05 21:51:04 UTC 
(rev 11984)
@@ -86,6 +86,8 @@
                if((this.pubKey != null) && (this.pubKey != pubKey) && 
!this.pubKey.equals(pubKey))
                        throw new IllegalArgumentException("Cannot reassign: 
was "+this.pubKey+" now "+pubKey);
                this.pubKey = pubKey;
+               if(!Arrays.equals(pubKey.asBytesHash(), pubKeyHash))
+                       throw new IllegalArgumentException();
        }

        public FreenetURI getURI() {


Reply via email to