rustls: Add support for SSLKEYLOGFILE

With rustls-ffi 0.15+ we can set up a callback for writing TLS secrets
hooked up to call Curl_tls_keylog_write. To make sure the associated
file is cleaned up we update the Curl_ssl struct for the rustls-ffi vtls
backend to have a cleanup callback.

Closes #16828
This commit is contained in:
Yedaya Katsman 2024-10-21 23:28:28 +03:00 committed by Daniel Stenberg
parent 9ad2d8c557
commit 1d31f2592f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 52 additions and 3 deletions

View file

@ -102,7 +102,7 @@ If you set this environment variable to a filename, curl stores TLS secrets
from its connections in that file when invoked to enable you to analyze the
TLS traffic in real time using network analyzing tools such as Wireshark. This
works with the following TLS backends: OpenSSL, LibreSSL (TLS 1.2 max),
BoringSSL, GnuTLS and wolfSSL.
BoringSSL, GnuTLS, wolfSSL and Rustls.
## `USERPROFILE` <dir>
On Windows, this variable is used when trying to find the home directory. If