node:tls
The built-in Node.js module for TLS connections and settings, used underneath node:https and HTTP/2 over TLS.
In more detail
tls.createSecureContext() bundles a certificate, key and settings such as minVersion: "TLSv1.3" so servers can reuse them. tls.connect() and tls.createServer() give encrypted sockets that behave like ordinary TCP sockets.
Related terms
- TLS — The encryption that protects data travelling over a network, the S in HTTPS.
- node:https — The built-in Node.js module for HTTP over TLS, combining node:http with node:tls.
- TLS certificate — A signed digital document that proves a server really owns a domain name and holds the key used to start encrypted TLS connections.
Taught in
- TLS & HTTPS Encryption: Certificates & SNI Contexts — Node.js Internals & Backend Services