From 9fde8d6fbe08ed90712c373a5cbcee60ad49c237 Mon Sep 17 00:00:00 2001 From: agatha Date: Wed, 11 Oct 2023 18:19:04 -0400 Subject: [PATCH] Log SSL keys to file --- src/examples/h2-example.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/examples/h2-example.py b/src/examples/h2-example.py index 54143e6..c03faf7 100644 --- a/src/examples/h2-example.py +++ b/src/examples/h2-example.py @@ -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)