Skip to content

Commit 5e76587

Browse files
thefourtheyervagg
authored andcommitted
doc: createServer's key option can be an array
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]>
1 parent bd4311b commit 5e76587

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/api/tls.markdown

+7-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,9 @@ automatically set as a listener for the [secureConnection][] event. The
163163
the `key`, `cert` and `ca` options.)
164164

165165
- `key`: A string or `Buffer` containing the private key of the server in
166-
PEM format. (Could be an array of keys). (Required)
166+
PEM format. To support multiple keys using different algorithms, an array
167+
can be provided. It can either be a plain array of keys, or an array of
168+
objects in the format `{pem: key, passphrase: passphrase}`. (Required)
167169

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

@@ -508,7 +510,10 @@ dictionary with keys:
508510

509511
* `pfx` : A string or buffer holding the PFX or PKCS12 encoded private
510512
key, certificate and CA certificates
511-
* `key` : A string holding the PEM encoded private key
513+
* `key`: A string or `Buffer` containing the private key of the server in
514+
PEM format. To support multiple keys using different algorithms, an array
515+
can be provided. It can either be a plain array of keys, or an array of
516+
objects in the format `{pem: key, passphrase: passphrase}`. (Required)
512517
* `passphrase` : A string of passphrase for the private key or pfx
513518
* `cert` : A string holding the PEM encoded certificate
514519
* `ca` : Either a string or list of strings of PEM encoded CA

0 commit comments

Comments
 (0)