doc: add note to tls docs about secureContext availability

tls.createServer() and new tls.Server() ignore secureContext option.

PR-URL: https://github.com/nodejs/node/pull/46224
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Tim Gerk authored and Juan José Arboleda committed 2023-01-31 08:04:21 -05:00
1 parent a558774a40
commit a9db45eee1
1 file changed
+3 -2
+3 -2
View File
@@ -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.