* Streaming: Fix P521 and RSA sig types

This commit is contained in:
zzz
2014-08-27 22:43:44 +00:00
parent 387629372b
commit 588ab86abb
3 changed files with 14 additions and 5 deletions

View File

@@ -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) * @return the written length (NOT the new offset)
*/ */
public int writeBytes(byte target[], int 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); System.arraycopy(_padding, 0, target, cur, _padding.length);
cur += _padding.length; cur += _padding.length;
} }
System.arraycopy(_signingKey.getData(), 0, target, cur, _signingKey.length()); int spkTrunc = Math.min(SigningPublicKey.KEYSIZE_BYTES, _signingKey.length());
cur += _signingKey.length(); System.arraycopy(_signingKey.getData(), 0, target, cur, spkTrunc);
cur += spkTrunc;
cur += _certificate.writeBytes(target, cur); cur += _certificate.writeBytes(target, cur);
return cur - offset; return cur - offset;
} }

View File

@@ -1,5 +1,12 @@
2014-08-27 zzz 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 2014-08-23 zzz
* Console, i2psnark, i2ptunnel: Escape fixes and cleanups * Console, i2psnark, i2ptunnel: Escape fixes and cleanups

View File

@@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 10; public final static long BUILD = 11;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";