-
-
Notifications
You must be signed in to change notification settings - Fork 120
feat: Support dumping TLS key log in NSS format for debugging #267
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
Conversation
commands/local_server_start.go
Outdated
@@ -169,6 +174,17 @@ var localServerStartCmd = &console.Command{ | |||
} | |||
} | |||
|
|||
// If 'SSLKEYLOGFILE' environment variable is set, uses this as a destination of TLS key log. | |||
// In this context, the name 'SSLKEYLOGFILE' is common, so using 'SSL' instead of 'TLS' name. | |||
// The key log file from the console argument or YAML config is preferred than the environment variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have expected the env var to take precedence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I am going to change the behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 91696a4
// If 'SSLKEYLOGFILE' environment variable is set, uses this as a destination of TLS key log. | ||
// In this context, the name 'SSLKEYLOGFILE' is common, so using 'SSL' instead of 'TLS' name. | ||
// This environment variable is preferred than the key log file from the console argument. | ||
if path := os.Getenv("SSLKEYLOGFILE"); path != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's possible to let console
take care of this by specifying EnvVars
on the associated flags.
See #268
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know about flags handling environment variables.
Thank you for the refactoring!
This pull request proposes to add TLS key logging in NSS format for debugging TLS connection.
It can be used for decrypting the encrypted data in TLS packets between the client and Symfony Local Web Server using Wireshark or something.
In addition to adding
--tls-key-log-file
argument, this adds support ofSSLKEYLOGFILE
environment variable for the same usage. The variable name is common in many applications.The NSS Key Log Format is described here:
https://firefox-source-docs.mozilla.org/security/nss/legacy/key_log_format/index.html
Example of the key log: