Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl: revert keylog_callback support for LibreSSL #13682

Closed
wants to merge 2 commits into from

Conversation

jay
Copy link
Member

@jay jay commented May 17, 2024

  • Revert to the legacy TLS 1.2 key logging code for LibreSSL.

Prior to this change if the user specified a filename in the SSLKEYLOGFILE environment variable and was using LibreSSL 3.5.0+ then an empty file would be created and no keys would be logged.

This is effectively a revert of e43474b which changed openssl.c to use SSL_CTX_set_keylog_callback for LibreSSL 3.5.0+. Unfortunately LibreSSL added that function only as a stub that doesn't actually do anything.

Reported-by: Gonçalo Carvalho

Fixes #13672
Closes #xxxx


This means we don't have TLS 1.3 key logging for LibreSSL? The legacy TLS 1.2 logging records only CLIENT_RANDOM, but I think for TLS 1.3 we need all of the secrets to decrypt that SSL_CTX_set_keylog_callback would record (ie SERVER_HANDSHAKE_TRAFFIC_SECRET, EXPORTER_SECRET, SERVER_TRAFFIC_SECRET_0, CLIENT_HANDSHAKE_TRAFFIC_SECRET, CLIENT_TRAFFIC_SECRET_0)

- Revert to the legacy TLS 1.2 key logging code for LibreSSL.

Prior to this change if the user specified a filename in the
SSLKEYLOGFILE environment variable and was using LibreSSL 3.5.0+ then
an empty file would be created and no keys would be logged.

This is effectively a revert of e43474b which changed openssl.c to use
SSL_CTX_set_keylog_callback for LibreSSL 3.5.0+. Unfortunately LibreSSL
added that function only as a stub that doesn't actually do anything.

Reported-by: Gonçalo Carvalho

Fixes curl#13672
Closes #xxxx
@bagder
Copy link
Member

bagder commented May 17, 2024

Maybe docs/cmdline-opts/_ENVIRONMENT.md should be clarified about the libressl state as well?

@jay jay closed this in 9aae9bf May 20, 2024
@jay jay deleted the revert_keylog_callback branch May 20, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

SSLKEYLOGFILE not working with curl-for-win build
3 participants