Skip to content

Commit

Permalink
doc: createServer's key option can be an array
Browse files Browse the repository at this point in the history
The `tls` module's `createServer` and `createSecureContext` accept
`key` option and it can be an array of keys as well. This patch
explains the format of the entries in that array.

Corresponding code:
https://github.com/nodejs/node/blob/v4.1.1/lib/_tls_common.js#L73-L90

PR-URL: #3123
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
  • Loading branch information
thefourtheye authored and jasnell committed Oct 30, 2015
1 parent 5bdbe5d commit db8e2f1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions doc/api/tls.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ automatically set as a listener for the [secureConnection][] event. The
the `key`, `cert` and `ca` options.)

- `key`: A string or `Buffer` containing the private key of the server in
PEM format. (Could be an array of keys). (Required)
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}`. (Required)

- `passphrase`: A string of passphrase for the private key or pfx.

Expand Down Expand Up @@ -487,7 +489,10 @@ dictionary with keys:

* `pfx` : A string or buffer holding the PFX or PKCS12 encoded private
key, certificate and CA certificates
* `key` : A string holding the PEM encoded private key
* `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}`. (Required)
* `passphrase` : A string of passphrase for the private key or pfx
* `cert` : A string holding the PEM encoded certificate
* `ca` : Either a string or list of strings of PEM encoded CA
Expand Down

0 comments on commit db8e2f1

Please sign in to comment.