Data: Fix length for offline sig verification

This commit is contained in:
zzz
2019-02-03 12:49:56 +00:00
parent f288682436
commit d7808cd16d

View File

@ -207,7 +207,7 @@ public class LeaseSet2 extends LeaseSet {
I2PAppContext ctx = I2PAppContext.getGlobalContext(); I2PAppContext ctx = I2PAppContext.getGlobalContext();
if (_transientExpires < ctx.clock().now()) if (_transientExpires < ctx.clock().now())
return false; return false;
ByteArrayOutputStream baos = new ByteArrayOutputStream(128); ByteArrayOutputStream baos = new ByteArrayOutputStream(6 + _transientSigningPublicKey.length());
try { try {
DataHelper.writeLong(baos, 4, _transientExpires / 1000); DataHelper.writeLong(baos, 4, _transientExpires / 1000);
DataHelper.writeLong(baos, 2, _transientSigningPublicKey.getType().getCode()); DataHelper.writeLong(baos, 2, _transientSigningPublicKey.getType().getCode());