r26784 - trunk/plugins/KeyExplorer

[email protected] Tue, 14 Apr 2009 17:26:26 +0000
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: saces
Date: 2009-04-14 17:26:26 +0000 (Tue, 14 Apr 2009)
New Revision: 26784

Modified:
   trunk/plugins/KeyExplorer/KeyExplorer.java
Log:
use FreenetURI.sskForUSK(), saves temp key objects.

Modified: trunk/plugins/KeyExplorer/KeyExplorer.java
===================================================================
--- trunk/plugins/KeyExplorer/KeyExplorer.java	2009-04-14 15:34:19 UTC (rev 26783)
+++ trunk/plugins/KeyExplorer/KeyExplorer.java	2009-04-14 17:26:26 UTC (rev 26784)
@@ -923,12 +923,10 @@
 		// turn USK into SSK
 		if (tempURI.isUSK()) {
 			if (errors != null) {
-				USK tempUSK = USK.create(tempURI);
-				ClientKey tempKey = tempUSK.getSSK();
-				tempURI = tempKey.getURI();
+				tempURI = tempURI.sskForUSK();
 				errors.add("URI was an USK, converted it to SSK for you");
 			} else {
-				throw new MalformedURLException("USK not supported, use underlaying SSK insted.");
+				throw new MalformedURLException("USK not supported, use underlying SSK instead.");
 			}
 		}