deno
41523bfa - fix(ext/node): tls server error message, rejection capture, two compat tests (#34183)

Commit
73 days ago
fix(ext/node): tls server error message, rejection capture, two compat tests (#34183) A handful of small node:tls compat improvements found while running the node_compat parallel/test-tls suite. The rustls InvalidMessage error text now embeds the OpenSSL-style SSL routines:ssl3_get_record:wrong version number marker, so Node user code (and a couple of node_compat tests) that pattern-matches on that phrase keeps working when a handshake fails with a non-TLS peer. tls.Server now installs a Symbol.for("nodejs.rejection") handler, so an async secureConnection listener that rejects destroys the socket with the error instead of bubbling to uncaughtException. This mirrors what net.Server already does for the connection event. Also enables test-tls-timeout-server and test-tls-secure-session in tests/node_compat/config.jsonc; both pass against the current implementation and were just missing from the config.
Author
Parents
Loading