From d4ce20b548ec66be7942971e155c72f46bc86bfb Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Mon, 25 Mar 2019 12:12:17 -0700 Subject: [PATCH 1/2] doc: remove reference to "credentials object" The reference is confusing because the object is actually of class SecureContext. There is no object with class "credentials". See: https://github.com/nodejs/node/issues/20432#issuecomment-441819285 --- doc/api/tls.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/tls.md b/doc/api/tls.md index 0ad7bd1d4d50bb..aa0dba49b01e7b 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1406,7 +1406,9 @@ to `true`, other APIs that create secure contexts leave it unset. from `process.argv` as the default value of the `sessionIdContext` option, other APIs that create secure contexts have no default value. -The `tls.createSecureContext()` method creates a credentials object. +The `tls.createSecureContext()` method creates a `SecureContext` object. The +object has no public methods, but is accepted as an argument to several `tls` +APIs, such as [`tls.createServer()`][] and [`server.addContext()`][]. A key is *required* for ciphers that make use of certificates. Either `key` or `pfx` can be used to provide it. @@ -1658,6 +1660,7 @@ where `secureSocket` has the same API as `pair.cleartext`. [`net.Server.address()`]: net.html#net_server_address [`net.Server`]: net.html#net_class_net_server [`net.Socket`]: net.html#net_class_net_socket +[`server.addContext()`]: #tls_server_addcontext_hostname_context [`server.getConnections()`]: net.html#net_server_getconnections_callback [`server.getTicketKeys()`]: #tls_server_getticketkeys [`server.listen()`]: net.html#net_server_listen From ba029f50dede784f78f8f56d25733a5ac0282f8f Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Tue, 26 Mar 2019 09:39:23 -0700 Subject: [PATCH 2/2] fixup! doc: remove reference to "credentials object" --- doc/api/tls.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/tls.md b/doc/api/tls.md index aa0dba49b01e7b..ac97742d27978e 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1406,9 +1406,9 @@ to `true`, other APIs that create secure contexts leave it unset. from `process.argv` as the default value of the `sessionIdContext` option, other APIs that create secure contexts have no default value. -The `tls.createSecureContext()` method creates a `SecureContext` object. The -object has no public methods, but is accepted as an argument to several `tls` -APIs, such as [`tls.createServer()`][] and [`server.addContext()`][]. +The `tls.createSecureContext()` method creates a `SecureContext` object. It is +usable as an argument to several `tls` APIs, such as [`tls.createServer()`][] +and [`server.addContext()`][], but has no public methods. A key is *required* for ciphers that make use of certificates. Either `key` or `pfx` can be used to provide it.