From 588ab86abbadd29bb65d6afa4335570016ebaa21 Mon Sep 17 00:00:00 2001 From: zzz Date: Wed, 27 Aug 2014 22:43:44 +0000 Subject: [PATCH] * Streaming: Fix P521 and RSA sig types --- core/java/src/net/i2p/data/Destination.java | 8 +++++--- history.txt | 9 ++++++++- router/java/src/net/i2p/router/RouterVersion.java | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/core/java/src/net/i2p/data/Destination.java b/core/java/src/net/i2p/data/Destination.java index 07bf1ad6c..866bf9165 100644 --- a/core/java/src/net/i2p/data/Destination.java +++ b/core/java/src/net/i2p/data/Destination.java @@ -104,7 +104,8 @@ public class Destination extends KeysAndCert { } /** - * deprecated, used only by Packet.java in streaming + * Deprecated, used only by Packet.java in streaming. + * Broken for sig types P521 and RSA before 0.9.15 * @return the written length (NOT the new offset) */ public int writeBytes(byte target[], int offset) { @@ -115,8 +116,9 @@ public class Destination extends KeysAndCert { System.arraycopy(_padding, 0, target, cur, _padding.length); cur += _padding.length; } - System.arraycopy(_signingKey.getData(), 0, target, cur, _signingKey.length()); - cur += _signingKey.length(); + int spkTrunc = Math.min(SigningPublicKey.KEYSIZE_BYTES, _signingKey.length()); + System.arraycopy(_signingKey.getData(), 0, target, cur, spkTrunc); + cur += spkTrunc; cur += _certificate.writeBytes(target, cur); return cur - offset; } diff --git a/history.txt b/history.txt index f0be8b6db..1b195dfa6 100644 --- a/history.txt +++ b/history.txt @@ -1,5 +1,12 @@ 2014-08-27 zzz - * i2psnark: Persist uploaded count (tickets #1034, #1298) + * i2psnark: + - Persist uploaded count (tickets #1034, #1298) + - Don't retry announce if we get back HTML + - Recognize Vuze tracker rejections + - Don't retry rejected announces unless seeding + - Better UI handling of announces with ports or full destination + * NetDB: Don't abort initialization on an unsupported RI sig type + * Streaming: Fix P521 and RSA sig types 2014-08-23 zzz * Console, i2psnark, i2ptunnel: Escape fixes and cleanups diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 7ca1a3ec2..5a58b19bc 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 10; + public final static long BUILD = 11; /** for example "-test" */ public final static String EXTRA = "";