Skip to content

Log 1-RTT keys in SSLKEYLOG when using OpenSSL#5297

Closed
andrewkdinh wants to merge 1 commit into
microsoft:mainfrom
andrewkdinh:openssl-fixes
Closed

Log 1-RTT keys in SSLKEYLOG when using OpenSSL#5297
andrewkdinh wants to merge 1 commit into
microsoft:mainfrom
andrewkdinh:openssl-fixes

Conversation

@andrewkdinh

@andrewkdinh andrewkdinh commented Jul 30, 2025

Copy link
Copy Markdown
Contributor

Description

This change ensures that all 1-RTT keys are properly logged to the SSLKEYLOGFILE, which was not fully implemented in microsoft/msquic#4959. Without this, some QUIC traffic could not be decrypted during analysis.

Example SSLKEYLOGFILE from running resumption QUIC interop test:

# TLS 1.3 secrets log file, generated by quicinterop
CLIENT_HANDSHAKE_TRAFFIC_SECRET xxxx xxxx
SERVER_HANDSHAKE_TRAFFIC_SECRET xxxx xxxx
CLIENT_TRAFFIC_SECRET_0 xxxx xxxx
SERVER_TRAFFIC_SECRET_0 xxxx xxxx
CLIENT_EARLY_TRAFFIC_SECRET xxxx xxxx
CLIENT_HANDSHAKE_TRAFFIC_SECRET xxxx xxxx
SERVER_HANDSHAKE_TRAFFIC_SECRET xxxx xxxx
CLIENT_TRAFFIC_SECRET_0 xxxx xxxx
SERVER_TRAFFIC_SECRET_0 xxxx xxxx

Additionally, this update fixes an unrelated issue where a conditional block for if openssl was missing.

Testing

Previously, Wireshark was unable to decrypt certain packets in QUIC interop tests due to missing 1-RTT keys in the SSLKEYLOGFILE when using MsQuic built with the OpenSSL backend.

With this fix:

  • I am now able to successfully decrypt QUIC packets using the SSL key log in Wireshark.
  • More QUIC interop tests pass, since the test suite uses tshark to analyze traffic using the SSLKEYLOGFILE.

These changes will be validated through the https://github.com/openssl/openssl GitHub Actions CI, which includes interop testing using MsQuic built with OpenSSL backend. Here is a QUIC interop run on my own fork before it is merged to https://github.com/openssl/openssl: https://github.com/andrewkdinh/openssl/actions/runs/16625623943

Fixes openssl/project#1311

@andrewkdinh
andrewkdinh requested a review from a team as a code owner July 30, 2025 15:33
@andrewkdinh

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="OpenSSL Corporation"

@guhetier

Copy link
Copy Markdown
Collaborator

Thanks for the contribution!
This appear to be largely a duplicate of #5222, which is currently under review.

@andrewkdinh

Copy link
Copy Markdown
Contributor Author

Ah, didn’t know about that one. Will close this, thanks

@andrewkdinh andrewkdinh linked an issue Jul 31, 2025 that may be closed by this pull request
@andrewkdinh
andrewkdinh deleted the openssl-fixes branch July 31, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log 1-RTT keys to SSLKEYLOG in msquic

2 participants