* Certificate: Fix creation bug; improve router cert generation

This commit is contained in:
zzz
2011-05-20 12:46:50 +00:00
parent 64a753116b
commit 20452c9387
2 changed files with 9 additions and 11 deletions

View File

@ -44,7 +44,7 @@ public class Certificate extends DataStructureImpl {
public final static int CERTIFICATE_TYPE_MULTIPLE = 4;
/**
* Pull from cache or return new
* If null cert, return immutable static instance, else create new
* @throws AIOOBE if not enough bytes
* @since 0.8.3
*/
@ -57,7 +57,7 @@ public class Certificate extends DataStructureImpl {
if (length == 0)
return new Certificate(type, null);
byte[] payload = new byte[length];
System.arraycopy(data, off = 3, payload, 0, length);
System.arraycopy(data, off + 3, payload, 0, length);
return new Certificate(type, payload);
}