Skip to content

Commit

Permalink
doc: add note to tls docs about secureContext availability
Browse files Browse the repository at this point in the history
tls.createServer() and new tls.Server() ignore secureContext option.

PR-URL: #46224
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
tgerk authored and juanarbol committed Jan 26, 2023
1 parent 5f6aab3 commit ec6f1e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -1938,8 +1938,9 @@ 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. It is
usable as an argument to several `tls` APIs, such as [`tls.createServer()`][]
and [`server.addContext()`][], but has no public methods.
usable as an argument to several `tls` APIs, such as [`server.addContext()`][],
but has no public methods. The [`tls.Server`][] constructor and the
[`tls.createServer()`][] method do not support the `secureContext` option.

A key is _required_ for ciphers that use certificates. Either `key` or
`pfx` can be used to provide it.
Expand Down

0 comments on commit ec6f1e9

Please sign in to comment.