-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
SSLKEYLOGFILE not working with curl-for-win build #13672
Comments
LibreSSL doesn't really support the keylog mechanism. The API exists since a number of things don't properly test and guard for it, but it is a noop. |
And I guess the reason to use LibreSSL on Windows is because it makes for easier builds? Or just a preference in general due to possible security considerations? |
- 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
Thanks, I missed that on review when we enabled support. I am proposing #13682 to revert to the legacy TLS 1.2 logging for LibreSSL. Is there a way we can extract TLS 1.3 secrets with LibreSSL?
There were a number of reasons, see curl/curl-for-win#44 /cc @vszakats |
I need the keylog feature and have been trying for days (weeks) to build curl with open ssl on windows successfully. latest try is Has anyone got a working openssl (3.1.0a) curl build? or set of working steps? Is there perhaps a build server in a buidl farm running a build config for this. |
You can do your own curl-for-win build by forking its repo and customizing |
Perhaps a better example is curl's CI job doing a customized curl-for-win build: curl/.github/workflows/curl-for-win.yml Lines 72 to 93 in ca6b05b
You can copy it (almost) as-is into any GitHub project and tweak Should also be easy to move to non-GitHub host, or local. |
I fear I have gone down the wrong path here not realizing curl-wor-win is not MS build. Problem is dependencies also need to be then llvm or mingw and they are used elsewhere. I just need a working CMAKE invokation line for openssl that uses the Visual Studio Generator. I think this may actually be broken and I do not think it is still being tested as the #defs in the code do not look correct and USE_SSL is not making it from the CMAKE settings into the #defines and the resulting code does not have https support. |
Any news on this? I just bumped into the same issue. I need to debug a communication over TLS (capturing it using Wireshark) and that is not working with curl on Windows since the keys are not showing up in the file designated via SSLKEYLOGFILE. :-(
|
This thread is about the curl-for-win official curl build. What you are using is the Microsoft-supplied build, with Schannel, and Schannel doesn't support |
Unfortunately I spent an entire weekend on this and building anything other than SChannel is no longer tested or supported. I could not find a working openssl build or build it with the options needed for use. Deep dependency errors and way to much work. :-( |
(edit: curl-for-win uses LibreSSL, which also doesn't support this.) |
I cannot remember exactly what, but it was stripped down and was missing a basic functionality which sent me down the build it rabbit hole that never ended. I just switched to linux and was done in 5 min 4 of which I went to get coffee. Windows is not "Seriously" support. Sorry I did not document exactly what, it was a while ago. |
Thanks for clarifying. I hadn't realized that. I had come here via a Google search re. "curl" and "SSLKEYLOGFILE not working" not knowing that there are different implementations or builds around. |
Hello guys. I'm trying to run curl for windows from Powershell and I'd like to capture the master key used for TLS encoding. To do that, I'm setting the
As I've said, the file is created, but it's always empty. Am I missing something? I mean, in Linux (bash/zsh) it works with something like Thanks. |
curl uses LibreSSL and LibreSSL misses support for Building a custom curl with a different OpenSSL [fork] is necessary to have this feature. |
From discussion #13665 the reporter @glslang is using the official curl for windows build 8.7.1 64-bit and SSLKEYLOGFILE is not working. A blank file is created and nothing is written.
I can reproduce with the same build. curl 8.7.1 with OpenSSL then SSLKEYLOGFILE works so I suspect this is an issue with how we coded it for LibreSSL
The text was updated successfully, but these errors were encountered: