Access the encrypted TLS payload


Apologies for my ignorant question, my C++ is worse than rusty and I’m completely new to binpac.

I’m trying to access the CiphertextRecord restofdata here: I’m expecting SSLRecord to have the data in the rec vector, based on how SSLRecord is defined. I must be misunderstanding something:

The RecordText vector is always empty. How can I get at the encrypted data?


After some time, I returned to this and learned how binpac actually works.

proc_ciphertext_record is called when the record is parsed and before it is added to the container which holds it.

To get access to it, pass this to the function.


function proc_ciphertext_record(rec : SSLRecord, ct : CiphertextRecord)and
refine typeattr CiphertextRecord += &let {

proc : bool = $context.connection.proc_ciphertext_record(rec, this);