tlsSocket.authorizationError

tlsSocket.authorizationError The reason why the peer's certificate has not been verified. This property becomes available only when tlsSocket.authorized === false.

tls.getCiphers()

tls.getCiphers() Returns an array with the names of the supported SSL ciphers. Example: var ciphers = tls.getCiphers(); console.log(ciphers); // ['AES128-SHA', 'AES256-SHA', ...]

tls.Server

Class: tls.Server This class is a subclass of net.Server and has the same methods on it. Instead of accepting only raw TCP connections, this accepts encrypted connections using TLS or SSL.

tls.createServer()

tls.createServer(options[, secureConnectionListener]) Creates a new tls.Server. The connectionListener argument is automatically set as a listener for the 'secureConnection' event. The options object may contain the following fields: pfx: A string or Buffer containing the private key, certificate and CA certs of the server in PFX or PKCS12 format. (Mutually exclusive with the key, cert, and ca options.) key: A string or Buffer containing the private key of the server in PEM format. To suppo

tls.connect()

tls.connect(options[, callback])

tls.createSecurePair()

tls.createSecurePair([context][, isServer][, requestCert][, rejectUnauthorized][, options]) Creates a new secure pair object with two streams, one of which reads and writes the encrypted data and the other of which reads and writes the cleartext data. Generally, the encrypted stream is piped to/from an incoming encrypted data stream and the cleartext one is used as a replacement for the initial encrypted stream. credentials: A secure context object from tls.createSecureContext( ... ). isSer

tls.createSecureContext()

tls.createSecureContext(options) Creates a credentials object; the options object may contain the following fields: pfx : A string or Buffer holding the PFX or PKCS12 encoded private key, certificate, and CA certificates. key: A string or Buffer containing the private key of the server in PEM format. To support multiple keys using different algorithms, an array can be provided. It can either be a plain array of keys or an array of objects in the format {pem: key, passphrase: passphrase}. (Re

stringdecoder.end()

decoder.end() Returns any trailing bytes that were left in the buffer.

stringdecoder.write()

decoder.write(buffer) Returns a decoded string.

timeout event (net.Socket)

Event: 'timeout' Emitted if the socket times out from inactivity. This is only to notify that the socket has been idle. The user must manually close the connection. See also: socket.setTimeout()