I am looking for a library or code snippet or general advice for decrypting https traffic from a browser, from the client point of view (no access to the server, but full access to the client). I know that firefox for example supports NSS, so that it can drop the ssl key into a file, but how can it be exploited by the libpcap API to decrypt the https traffic ?
This seems like a fairly common question so I thought I'd ask it here, maybe it has already been addressed before, so that I don't have to reinvent the wheel.
Edit: so in order words, I would like to have a code snippet or code architecture that helps me to decrypt https traffic from tcp packets, given the browser master key. Something similar to what wireshark already does, as described here: https://security.stackexchange.com/questions/35639/decrypting-tls-in-wireshark-when-using-dhe-rsa-ciphersuites
Thanks.