diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java index 31f5f17834c7250f9f62e1492385414985eb0cc8..babdba976de36619bbcdcbb3cda169d257f5880f 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelServer.java @@ -210,7 +210,9 @@ public class I2PTunnelServer extends I2PTunnelTask implements Runnable { * */ public void startRunning() { - Thread t = new I2PAppThread(this, "Server " + remoteHost + ':' + remotePort, true); + // prevent JVM exit when running outside the router + boolean isDaemon = getTunnel().getContext().isRouterContext(); + Thread t = new I2PAppThread(this, "Server " + remoteHost + ':' + remotePort, isDaemon); t.start(); } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateHandler.java index 879f0ee3d8d4a79121f46d20d91a4dd89e59e013..884a20bb5fcbf1dbd92871b41a59747310f77a3f 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/PluginUpdateHandler.java @@ -213,10 +213,15 @@ public class PluginUpdateHandler extends UpdateHandler { if (up.haveKey(pubkey)) { // the key is already in the TrustedUpdate keyring // verify the sig and verify that it is signed by the signer in the plugin.config file + // Allow "" as the previously-known signer String signingKeyName = up.verifyAndGetSigner(f); - if (!signer.equals(signingKeyName)) { + if (!(signer.equals(signingKeyName) || "".equals(signingKeyName))) { f.delete(); to.delete(); + if (signingKeyName == null) + _log.error("Failed to verify plugin signature, corrupt plugin or bad signature, signed by: " + signer); + else + _log.error("Plugin signer \"" + signer + "\" does not match existing signer in plugin.config file \"" + signingKeyName + "\""); statusDone("<b>" + _("Plugin signature verification of {0} failed", url) + "</b>"); return; } @@ -226,6 +231,7 @@ public class PluginUpdateHandler extends UpdateHandler { // bad or duplicate key f.delete(); to.delete(); + _log.error("Bad key or key mismatch - Failed to add plugin key \"" + pubkey + "\" for plugin signer \"" + signer + "\""); statusDone("<b>" + _("Plugin signature verification of {0} failed", url) + "</b>"); return; } @@ -235,6 +241,11 @@ public class PluginUpdateHandler extends UpdateHandler { if (!signer.equals(signingKeyName)) { f.delete(); to.delete(); + if (signingKeyName == null) + _log.error("Failed to verify plugin signature, corrupt plugin or bad signature, signed by: " + signer); + else + // shouldn't happen + _log.error("Plugin signer \"" + signer + "\" does not match new signer in plugin.config file \"" + signingKeyName + "\""); statusDone("<b>" + _("Plugin signature verification of {0} failed", url) + "</b>"); return; } diff --git a/history.txt b/history.txt index 39cbf8e37b6880f7eb4592bbae78c82d6cf389c9..1e4e7de6068e23ed59720c3c1568ec5dd990af2c 100644 --- a/history.txt +++ b/history.txt @@ -1,5 +1,12 @@ +2011-02-19 zzz + * I2PTunnel: Fix standalone server tunnels + http://forum.i2p/viewtopic.php?t=5376 + * Plugins: Fix signature verification if router.config specifies + trustedUpdateKeys (ticket #416) + 2011-02-18 Mathiasdm * Desktopgui now has an option to be disabled (desktopgui.enabled) + 2011-02-17 zzz * Build: - Add includeAntRuntime=false to all javac targets diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 31c35f8c3e7f27dae7384d36e3443978e8ab5e40..421ff4f630110e645f24b485d06a7151f306e1cd 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,10 +18,10 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 14; + public final static long BUILD = 16; /** for example "-test" */ - public final static String EXTRA = ""; + public final static String EXTRA = "-rc"; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; public static void main(String args[]) { System.out.println("I2P Router version: " + FULL_VERSION);