An array of strings or Buffer
s containing supported NPN protocols. Buffer
s should have the format [len][name][len][name]...
e.g. 0x05hello0x05world
, where the first byte is the length of the next protocol name. Passing an array is usually much simpler, e.g. ['hello', 'world']
.
A string, Buffer
, array of strings, or array of Buffer
s of trusted certificates in PEM format. If this is omitted several well known "root" CAs (like VeriSign) will be used. These are used to authorize connections.
A string, Buffer
, array of strings, or array of Buffer
s containing the certificate key of the client in PEM format.
A callback function to be used when checking the server's hostname against the certificate. This should throw an error if verification fails. The method should return undefined
if the servername
and cert
are verified.
A string describing the ciphers to use or exclude, separated by :
. Uses the same default cipher suite as tls.createServer()
.
Host the client should connect to.
A string, Buffer
, array of strings, or array of Buffer
s containing the private key of the client in PEM format.
Minimum size of the DH parameter in bits to accept a TLS connection. When a server offers a DH parameter with a size less than minDHSize
, the TLS connection is destroyed and an error is thrown. Defaults to 1024
.
A string containing the passphrase for the private key or pfx.
Creates unix socket connection to path. If this option is specified, host
and port
are ignored.
A string
or Buffer
containing the private key, certificate, and CA certs of the client in PFX or PKCS12 format.
Port the client should connect to.
If true, the server certificate is verified against the list of supplied CAs. An 'error'
event is emitted if verification fails; err.code
contains the OpenSSL error code. Defaults to true
.
An optional TLS context object as returned by from tls.createSecureContext( ... )
. It can be used for caching client certificates, keys, and CA certificates.
The SSL method to use, e.g., SSLv3_method
to force SSL version 3. The possible values depend on the version of OpenSSL installed in the environment and are defined in the constant SSL_METHODS.
Server name for the SNI (Server Name Indication) TLS extension.
A Buffer
instance, containing TLS session.
Establish secure connection on a given socket rather than creating a new socket. If this option is specified, host
and port
are ignored.
Generated using TypeDoc
An array of strings or
Buffer
s containing the supported ALPN protocols.Buffer
s should have the format[len][name][len][name]...
e.g.0x05hello0x05world
, where the first byte is the length of the next protocol name. Passing an array is usually much simpler:['hello', 'world']
.)