Options for TLS using a PKCS#11 library for private key operations.
Unix only. nodejs only.
Use this X.509 certificate (contents in memory). The certificate must be PEM-formatted. The certificate may be specified by other means instead (ex: cert_file_path)
Use this X.509 certificate (file on disk). The certificate must be PEM-formatted. The certificate may be specified by other means instead (ex: cert_file_contents)
Use this PKCS#11 library.
Specify the label of the private key object on the PKCS#11 token. If not specified, the key will be chosen based on other criteria (such as being the only available private key on the token).
Specify the slot ID containing a PKCS#11 token. If not specified, the token will be chosen based on other criteria (such as token_label).
Specify the label of the PKCS#11 token to use. If not specified, the token will be chosen based on other criteria (such as slot_id).
Use this PIN to log the user into the PKCS#11 token. Pass null
to log into a token with a "protected authentication path".
List of ALPN protocols to be used on platforms which support ALPN
Path to directory containing trust anchors. Only used on Unix-style systems.
Path to a single file with all trust anchors in it, in PEM format
Certificate, in PEM format
String with all trust anchors in it, in PEM format
Path to certificate, in PEM format
Minimum version of TLS to support. Uses OS/system default if unspecified.
PKCS#11 options. Currently, only supported on Unix
Path to certificate, in PKCS#12 format. Currently, only supported on OSX
Password for PKCS#12. Currently, only supported on OSX.
Private key, in PEM format
Path to private key, in PEM format
In client mode, this turns off x.509 validation. Don't do this unless you are testing. It is much better to just override the default trust store and pass the self-signed certificate as the ca_file argument.
In server mode (ServerTlsContext), this defaults to false. If you want to enforce mutual TLS on the server, set this to true.
Overrides the default system trust store.
String containing all trust CAs, in PEM format
Overrides the default system trust store.
Only used on Unix-style systems where all trust anchors are stored in a directory (e.g. /etc/ssl/certs).
Single file containing all trust CAs, in PEM format
Create options configured for mutual TLS in client mode, with client certificate and private key provided as in-memory strings.
Client certificate file contents, in PEM format
Client private key file contents, in PEM format
newly configured TlsContextOptions object
Create options configured for mutual TLS in client mode, with client certificate and private key provided via filepath.
Path to client certificate, in PEM format
Path to private key, in PEM format
newly configured TlsContextOptions object
Create options configured for mutual TLS in client mode, using a PKCS#11 library for private key operations.
NOTE: This configuration only works on Unix devices.
PKCS#11 options
newly configured TlsContextOptions object
Create options for mutual TLS in client mode, with client certificate and private key bundled in a single PKCS#12 file.
Path to PKCS#12 file containing client certificate and private key.
PKCS#12 password
newly configured TlsContextOptions object
Creates TLS context with peer verification disabled, along with a certificate and private key
Path to certificate, in PEM format
Path to private key, in PEM format
newly configured TlsContextOptions object
Creates TLS context with peer verification disabled, along with a certificate and private key in PKCS#12 format
Path to certificate, in PKCS#12 format
PKCS#12 Password
newly configured TlsContextOptions object
Generated using TypeDoc
Options for creating a ClientTlsContext or ServerTlsContext.
nodejs only.