Minimum version of TLS to support. Uses OS/system default if unspecified.
Optional
ca_Path to a single file with all trust anchors in it, in PEM format
Optional
ca_Path to directory containing trust anchors. Only used on Unix-style systems.
Optional
certificate_String with all trust anchors in it, in PEM format
List of ALPN protocols to be used on platforms which support ALPN
Optional
certificate_Path to certificate, in PEM format
Optional
certificateCertificate, in PEM format
Optional
private_Path to private key, in PEM format
Optional
private_Private key, in PEM format
Optional
pkcs12_Path to certificate, in PKCS#12 format. Currently, only supported on OSX
Optional
pkcs12_Password for PKCS#12. Currently, only supported on OSX.
Optional
pkcs11_PKCS#11 options. Currently, only supported on Unix
Optional
windows_Path to certificate in a Windows cert store. Windows only.
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.
Static
create_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
Static
create_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
Static
create_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
Static
create_Renamed [[create_client_with_mtls_pkcs12_from_path]]
Static
create_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
Static
create_Create options configured for mutual TLS in client mode, using a certificate in a Windows certificate store.
NOTE: Windows only.
Path to certificate in a Windows certificate store.
The path must use backslashes and end with the certificate's thumbprint.
Example: CurrentUser\MY\A11F8A9B5DF5B98BA3508FBCA575D09570E0D2C6
Static
create_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
Static
create_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
Overrides the default system trust store.
Optional
ca_dirpath: stringOnly used on Unix-style systems where all trust anchors are stored in a directory (e.g. /etc/ssl/certs).
Optional
ca_filepath: stringSingle file containing all trust CAs, in PEM format
Generated using TypeDoc
Options for creating a ClientTlsContext or ServerTlsContext.
nodejs only.