sslOptions
Description
Instead of providing the sslCert and sslKey configuration properties, sslOptions can be specified, which allows the use of every SSL configuration option supported by Node.js.
For the full list of options, see the Node.js TLS documentation.
sslOptions can be specified either as an object, or as a string pointing to an encrypted file created with the store_options.js utility.
When a string is used, an encryptionKey must be configured; otherwise the instance reports a configuration error and does not start.
Example 1: Specify Options Inline
Use a PKCS#12 certificate bundle. Note that the passphrase appears in clear text in config.js, which is what the encrypted-file approach below avoids:
sslOptions: {
pfx: "c:\\pjscerts\\cert.pfx",
passphrase: "xxxxxxxxxxxxxxx"
}Example 2: Use an Encrypted Options File
Point the setting at the file produced by store_options.js:
sslOptions: "ssl_options"Using store_options.js
The store_options.js script creates an encrypted file containing the SSL options. This is especially useful when you are using an SSL passphrase and do not want to store it in the clear in your configuration file.
Usage
The syntax for the command is:
node store_options.js --key1 value1 --key2 value2If a value contains special characters, such as a backslash, enclose the value in quotes or escape it. For example:
node store_options.js --pfx "c:\pjscerts\cert.pfx"or:
node store_options.js --pfx c:\\pjscerts\\cert.pfxOutput File
The default output file name is ssl_options. To specify a different output file, use the --file command line parameter. For example:
node store_options.js --file my_options --pfx "c:\pjscerts\cert.pfx" --passphrase "xxxxxxxxxxxxxxx"For information on how to modify this setting, see Configuration File.