SubpacketLength::serialize not implementet correctly
SubpacketLength::serialize
should use the "New Format Packet Length" (RFC4880 5.2.3.1 and 4.2.2), but the maximum length of the two-octet version is 16320, not 8383, and the five-octet version has no leading 0xFF octet.
This did not turn up in testing, probably because the five-octet encoding was not used in roundtrip tests.
Todo:
- Use
BodyLength::serialize
inSubpacketLength::serialzie
to have only one implementation of the encoding - Make
Subpacket::arbitrary
generate more diverse data, so that this is caught in testing.