-
Bug
-
Resolution: Done
-
Major
-
None
-
None
When an element's length is greater than 127 bytes, DEREncoder#writeLength successfully writes the length octets using the long form where bit 8 of first octet has value "1" and bits 7-1 give the number of additional length octets and the second and following octets give the length. However, the value returned by writeLength in this case is currently just the number of additional length octets. When such an element is part of a SET, this results in the wrong accumulated length for the SET. The value returned by writeLength should also include the first octet.