Zig Version
0.16.0-dev.727+95242cc43
Steps to Reproduce and Observed Behavior
There is a standard library option http_enable_ssl_key_log_file whose stated purpose is to tell std.http.Client to respect the SSLKEYLOGFILE environment variable for capturing TLS secrets:
|
/// This enables `std.http.Client` to log ssl secrets to the file specified by the SSLKEYLOGFILE |
|
/// env var. Creating such a log file allows other programs with access to that file to decrypt |
|
/// all `std.http.Client` traffic made by this program. |
|
http_enable_ssl_key_log_file: bool = @import("builtin").mode == .Debug, |
It is enabled by default in debug mode.
In particular, consider a debug build of the Zig compiler itself, and the following command:
SSLKEYLOGFILE=$HOME/tmp/sslkeylog stage4/bin/zig fetch git+https://github.com/ianprime0509/zig-xml
Using Zig 0.16.0-dev.727+95242cc43, this command does not write anything to the specified key log file.
Expected Behavior
Using a debug build of Zig 0.14.1, the command above logs TLS secrets to the specified key log file. Either this behavior should be restored (it is very useful for debugging), or the standard library option should be removed. (Even if the option is removed, I would still argue for its inclusion at least in debug builds of the compiler to help debug package fetching logic)
Some notes:
Zig Version
0.16.0-dev.727+95242cc43
Steps to Reproduce and Observed Behavior
There is a standard library option
http_enable_ssl_key_log_filewhose stated purpose is to tellstd.http.Clientto respect theSSLKEYLOGFILEenvironment variable for capturing TLS secrets:zig/lib/std/std.zig
Lines 168 to 171 in 958faa7
In particular, consider a debug build of the Zig compiler itself, and the following command:
SSLKEYLOGFILE=$HOME/tmp/sslkeylog stage4/bin/zig fetch git+https://github.com/ianprime0509/zig-xmlUsing Zig 0.16.0-dev.727+95242cc43, this command does not write anything to the specified key log file.
Expected Behavior
Using a debug build of Zig 0.14.1, the command above logs TLS secrets to the specified key log file. Either this behavior should be restored (it is very useful for debugging), or the standard library option should be removed. (Even if the option is removed, I would still argue for its inclusion at least in debug builds of the compiler to help debug package fetching logic)
Some notes: