From f1efe6dae0aefac1872d27ad538cc7624245341f Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 30 Apr 2019 12:19:10 -0400 Subject: [PATCH] tls,cli: add --trace-tls command-line flag This commit adds a --trace-tls command-line flag. The purpose is to enable tracing of TLS connections without the need to modify existing application code. PR-URL: https://github.com/nodejs/node/pull/27497 Reviewed-By: Anna Henningsen Reviewed-By: Richard Lau Reviewed-By: Rich Trott --- doc/api/cli.md | 9 ++++ doc/node.1 | 3 ++ lib/_tls_wrap.js | 15 +++++- src/node_options.cc | 4 ++ src/node_options.h | 1 + test/parallel/test-tls-enable-trace-cli.js | 59 ++++++++++++++++++++++ 6 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-tls-enable-trace-cli.js diff --git a/doc/api/cli.md b/doc/api/cli.md index c0682d864c9d0a..50185b0cc094c3 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -632,6 +632,14 @@ added: v2.1.0 Prints a stack trace whenever synchronous I/O is detected after the first turn of the event loop. +### `--trace-tls` + + +Prints TLS packet trace information to `stderr`. This can be used to debug TLS +connection problems. + ### `--trace-warnings`