Node.js TLS plain TLS sockets This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets. Prepare certificates Generate a Certificate Authority: openssl req -new -x509 -days 9999 -keyout ca-key.pem -out ca-crt.pem