I am making https requests and logging the keys in using the SSLKEYLOGFILE environment variable. If I capture the packets using Wireshark, I can decrypt the packets by specifying the path of the key log file. I have another Go program that is using the gopacket and pcap library to capture the packets and I would like to replicate Wireshark’s behavior in this program.
My question is how can I use the key log file to decrypt the packet payload in Go? I have been looking at the crypto/tls package to do this but was not able to find this functionality. Any help in finding the right library or help with implementation would be appreciated.