* Certificate: Fix fatal null cert error

This commit is contained in:
zzz
2010-12-26 12:29:55 +00:00
parent 82e344055b
commit ff0c168d65

View File

@ -112,7 +112,9 @@ public class Certificate extends DataStructureImpl {
} }
} }
/**
* @return the written length (NOT the new offset)
*/
public int writeBytes(byte target[], int offset) { public int writeBytes(byte target[], int offset) {
int cur = offset; int cur = offset;
DataHelper.toLong(target, cur, 1, _type); DataHelper.toLong(target, cur, 1, _type);
@ -242,7 +244,7 @@ public class Certificate extends DataStructureImpl {
@Override @Override
public int writeBytes(byte target[], int offset) { public int writeBytes(byte target[], int offset) {
System.arraycopy(NULL_DATA, 0, target, offset, NULL_LENGTH); System.arraycopy(NULL_DATA, 0, target, offset, NULL_LENGTH);
return offset + NULL_LENGTH; return NULL_LENGTH;
} }
/** @throws RuntimeException always */ /** @throws RuntimeException always */