Skip to content

Commit

Permalink
doc: remove reference to "credentials object"
Browse files Browse the repository at this point in the history
The reference is confusing because the object is actually of class
SecureContext. There is no object with class "credentials".

See: #20432 (comment)

PR-URL: #26908
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
sam-github authored and BethGriggs committed Apr 4, 2019
1 parent cffcacc commit cf66e93
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,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.
Expand Down Expand Up @@ -1681,6 +1683,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
Expand Down

0 comments on commit cf66e93

Please sign in to comment.