Skip to content

rfc7468: allow multiple structures per file

Roman Donchenko requested to merge SpecLad/wireshark:multiple-certs into master

It's common to put multiple certificates in one RFC 7468 file in order to store a certificate chain, as described in the introduction to RFC 7468 itself. Support this usage by presenting each such certificate (or any other encoded structure - the code doesn't discriminate) as a separate packet.

The new parsing code supports arbitrary line lengths, so update the detection code to support arbitrary line lengths as well. Instead of probing up to 20 lines, we now try to find the first pre-encapsulation boundary in the first 2048 bytes of the file. I chose this new limit so that it works roughly the same in practice as the old one (it's equal to 20 lines times 80 characters per line, rounded to a power of two).

Merge request reports