Refactor unpacking of TLS.
class TLS is just a container for TLSRecords. As such, it doesn't need its own __hdr__. In current code it just copies the header of the 1st TLSRecord, which is technically incorrect.
A better pattern would be that TLS delegates unpacking to the underlying TLSRecord and advances the buffer. The proposed change does just that.
Coverage decreased (-5.0e-05%) to 99.817% when pulling 8e63d35d3e3239609a14a81be2819d6876299284 on fix-tls-records-unpacking into 0ac9dc84b10b6f9209c70d24a919d06e644ed62b on master.
Refactor unpacking of TLS.
class TLS
is just a container forTLSRecord
s. As such, it doesn't need its own__hdr__
. In current code it just copies the header of the 1stTLSRecord
, which is technically incorrect. A better pattern would be thatTLS
delegates unpacking to the underlyingTLSRecord
and advances the buffer. The proposed change does just that.