diff --git a/core/java/src/net/i2p/data/Certificate.java b/core/java/src/net/i2p/data/Certificate.java index aefc34ce61f1ae5ba836bfedae2eb142f979f359..200423d8bffcb18171e162796bc21d4bdcea5323 100644 --- a/core/java/src/net/i2p/data/Certificate.java +++ b/core/java/src/net/i2p/data/Certificate.java @@ -176,7 +176,7 @@ public class Certificate extends DataStructureImpl { if (_type < 0) throw new DataFormatException("Invalid certificate type: " + _type); //if ((_type != 0) && (_payload == null)) throw new DataFormatException("Payload is required for non null type"); - DataHelper.writeLong(out, 1, _type); + out.write((byte) _type); if (_payload != null) { DataHelper.writeLong(out, 2, _payload.length); out.write(_payload);