From bc52b6b7a8772ade4c7e7b2d413d8595c7882225 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Mon, 25 Mar 2019 12:12:17 -0700 Subject: [PATCH] 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 PR-URL: https://github.com/nodejs/node/pull/26908 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Reviewed-By: Ben Noordhuis --- 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 35f95d6405696b..9476b6e2aaa9b0 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1341,7 +1341,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. 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. @@ -1588,6 +1590,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