Uh oh!
There was an error while loading. Please reload this page.
doc: createServer's key option can be an array - #3123
Conversation
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
indutny
commented
Sep 30, 2015
@thefourtheye perhaps, it may be relevant to mention that the keys should use different algorithms? |
thefourtheye
commented
Sep 30, 2015
@indutny But we don't validate if the keys use different algorithms, right? https://github.com/nodejs/node/blob/v4.1.1/src/node_crypto.cc#L457-L500 |
indutny
commented
Sep 30, 2015
@thefourtheye hm... I'm sure we don't, but OpenSSL may. |
thefourtheye
commented
Sep 30, 2015
@indutny Oh okay then. I included a line to say that the keys should use different algorithms. Should we explicitly give examples of algorithms? |
silverwind
commented
Sep 30, 2015
When would one want to use multiple keys? |
indutny
commented
Sep 30, 2015
When you have two certs: ECDSA and RSA. Like I do on https://blog.indutny.com/ |
There was a problem hiding this comment.
What kind of algorithms is and the keys should use different algorithms referring to?
There was a problem hiding this comment.
ping @thefourtheye: could you clarify? Otherwise LGTM
There was a problem hiding this comment.
@silverwind The examples are ECDSA and RSA. Should we really mention them in the docs?
There was a problem hiding this comment.
My gut thought is to remove that and the keys should use different algorithms altogether.
There was a problem hiding this comment.
@silverwind Hmmm, it was @indutny's suggestion. Let's see what he feels about this.
There was a problem hiding this comment.
Ah, I see. I think your wording is a bit confusing. How about something like this?
`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 form of {pem: key, passphrase: passphrase}. (Required)
There was a problem hiding this comment.
@silverwind Ya, it looks better. I updated the PR now. PTAL.
thefourtheye
commented
Oct 25, 2015
Bump! |
silverwind
commented
Oct 26, 2015
LGTM |
thefourtheye
commented
Oct 26, 2015
@indutny LGTY? |
indutny
commented
Oct 28, 2015
LGTM |
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>
thefourtheye
commented
Oct 28, 2015
Thanks for the review :-) Landed at 5d5a4c4. @silverwind I tweaked the text a little bit. Instead of |
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: nodejs#3123 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
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>
jasnell
commented
Oct 30, 2015
Landed in v4.x-staging in db8e2f1 |
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>
The
tlsmodule'screateServerandcreateSecureContextacceptkeyoption and it can be an array of keys as well. This patchexplains 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
cc @nodejs/crypto