Commit Graph

4 Commits

Author SHA1 Message Date
Sam Roberts
2976bbd68f test: only assert on first lines of TLS trace
The TLS trace data is best-effort, and enough can be dropped from pipe
buffers that only the start of the trace is detected. Only assert on the
first line of the trace, it should not get dropped, and it's enough to
check that trace was enabled via CLI.

PR-URL: https://github.com/nodejs/node/pull/28043
Fixes: https://github.com/nodejs/node/issues/27636
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-06 10:18:04 -07:00
Sam Roberts
b1bd9e3dd2 tls: trace errors can show up as SSL errors
Calls to TLS_trace might leave errors on the SSL error stack, which then
get reported as SSL errors instead of being ignored. Wrap TLS_trace to
keep the error stack unchanged.

Fixes: https://github.com/nodejs/node/issues/27636

PR-URL: https://github.com/nodejs/node/pull/27841
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-05-30 12:34:30 +02:00
cjihrig
9a174db3d8 test: refactor test-tls-enable-trace-cli.js
PR-URL: https://github.com/nodejs/node/pull/27553
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-08 05:11:28 +02:00
cjihrig
495822f544
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 <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-05-02 12:37:54 -04:00