OpenSSL 3.5 builds configured with enable-sslkeylog honor SSLKEYLOGFILE
and write TLS connection secrets directly to a file. This bypasses HAProxy
logging, adds filesystem access during handshakes, degrades performance
and leaks file descriptors across master-worker reloads. HAProxy already
provides tune.ssl.keylog and sample fetches for logging these secrets
through its normal logging facilities.
Replace the startup warnings with a conditional unsetenv() before full
configuration parsing can load certificates and create SSL contexts.
Add the experimental ssl-workaround-bogus-keylogfile { on | off } global
option, defaulting to off. Setting it to on leaves the variable untouched;
setting it to off keeps the default behavior of removing the variable.
Discover this option and expose-experimental-directives during the initial
configuration pass so the decision is known before certificate loading.
Repeat the conditional unsetenv() after a worker restores its initial
environment. Keep the original environment backup unchanged so reloads
can reevaluate the option, without copying or restoring the variable.
Document the OpenSSL version and build option requirements, discourage
native key logging due to its filesystem access and reload issues, and
recommend tune.ssl.keylog instead.