Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5e76587

Browse filesBrowse 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 <me@silverwind.io> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
1 parent bd4311b commit 5e76587
Copy full SHA for 5e76587

File tree

Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed
Open diff view settings
Collapse file

‎doc/api/tls.markdown‎

Copy file name to clipboardExpand all lines: doc/api/tls.markdown
+7-2Lines changed: 7 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.