Always store USKs in the Sone.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 25 Jan 2011 19:52:43 +0000 (20:52 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 25 Jan 2011 19:52:43 +0000 (20:52 +0100)
src/main/java/net/pterodactylus/sone/data/Sone.java

index 03dff75..f183b39 100644 (file)
@@ -176,7 +176,7 @@ public class Sone implements Fingerprintable {
         */
        public Sone setRequestUri(FreenetURI requestUri) {
                if (this.requestUri == null) {
-                       this.requestUri = requestUri.setDocName("Sone").setMetaString(new String[0]);
+                       this.requestUri = requestUri.setKeyType("USK").setDocName("Sone").setMetaString(new String[0]);
                        return this;
                }
                if (!this.requestUri.equalsKeypair(requestUri)) {
@@ -204,7 +204,7 @@ public class Sone implements Fingerprintable {
         */
        public Sone setInsertUri(FreenetURI insertUri) {
                if (this.insertUri == null) {
-                       this.insertUri = insertUri.setDocName("Sone").setMetaString(new String[0]);
+                       this.insertUri = insertUri.setKeyType("USK").setDocName("Sone").setMetaString(new String[0]);
                        return this;
                }
                if (!this.insertUri.equalsKeypair(insertUri)) {