Log SSL keys to file

This commit is contained in:
agatha 2023-10-11 18:19:04 -04:00
parent 51d7f97753
commit 9fde8d6fbe

View File

@ -24,6 +24,9 @@ def make_http2_request():
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
# Dump SSL keys to file
ctx.keylog_filename = 'h2-keylog.log'
# Open socket and initiate TLS/SSL connection
s = socket.create_connection((SERVER_NAME, SERVER_PORT))
s = ctx.wrap_socket(s, server_hostname=SERVER_NAME)