Skip to content

Conversation

@mhils
Copy link
Member

@mhils mhils commented Nov 19, 2020

This PR fixes #3994, but requires a new pyOpenSSL release to be shipped first. Putting this here because I depend on it for sans-io debugging.

@mhils mhils added the upstream label Nov 19, 2020
@mhils mhils marked this pull request as draft November 19, 2020 13:42
@mhils mhils marked this pull request as ready for review November 27, 2020 22:07
tls.log_master_secret.close()
with open(logfile, "rb") as f:
assert f.read().count(b"CLIENT_RANDOM") >= 2
assert f.read().count(b"SERVER_HANDSHAKE_TRAFFIC_SECRET") >= 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean the content changed with the new pyopenssl version?
Is Wireshark already compatible with this new format?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It definitely changed for TLS 1.3, not sure what we'd get for older versions. It doesn't really matter though, the point of the new API is just that: here are some opaque bytes you should save as-is in your keylog file.

And yes, works fine with WireShark, I used this extensively for sans-io :-)

@mhils mhils merged commit de485ba into mitmproxy:master Nov 27, 2020
@mhils mhils deleted the keylog branch November 27, 2020 23:35
syhe pushed a commit to syhe/macports-ports that referenced this pull request May 10, 2021
mitmproxy requires pyOpenSSL>=20.0 since v6.0.0

refs mitmproxy/mitmproxy#4298
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSLKEYLOGFILE is not containing TLSv1.3 secrets

2 participants