Files
node/doc/api
soreavis 3618c954ac doc: fix broken TLS security level example
The example under "Setting security levels" does not run. The client
sets `maxVersion: 'TLSv1'` while its `minVersion` stays at the
`tls.DEFAULT_MIN_VERSION` default of `'TLSv1.2'`, so no version overlaps
and the connection fails with ERR_SSL_NO_PROTOCOLS_AVAILABLE. Setting
the client's `minVersion` is not enough on its own: the handshake then
fails with an alert 40, because `createServer` is given no key or
certificate and the server has no shared cipher.

Set `minVersion` on the client, add the key and certificate placeholders
and the openssl recipe that the other sections using them already carry,
pass the server certificate as the client's `ca`, and use port 8000 like
the rest of the file. The section now runs from an empty directory and
prints "Client connected with protocol: TLSv1".

Signed-off-by: Julian Soreavis <julian.soreavis@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65391
Fixes: https://github.com/nodejs/node/issues/60569
Refs: https://github.com/nodejs/node/pull/60571
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-21 15:01:49 +00:00
..
2026-08-09 19:06:22 -04:00
2026-08-01 06:15:08 +00:00
2026-07-18 10:18:51 +00:00
2026-08-03 11:44:23 +00:00
2026-08-15 13:15:47 -07:00
2026-08-14 03:39:59 +00:00
2026-08-05 18:21:40 +02:00
2026-08-20 23:55:56 +00:00
2025-12-16 20:31:28 +00:00
2026-08-21 13:39:55 +00:00
2026-08-03 11:44:23 +00:00
2026-08-03 11:44:23 +00:00
2026-08-07 11:29:48 +02:00
2026-08-05 13:57:32 +00:00
2026-08-05 18:21:40 +02:00