From a9db45eee1df81cda4a0e03e1554986a37018259 Mon Sep 17 00:00:00 2001 From: Tim Gerk Date: Tue, 17 Jan 2023 17:53:41 -0800 Subject: [PATCH] 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 Reviewed-By: Paolo Insogna Reviewed-By: Rich Trott --- doc/api/tls.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/tls.md b/doc/api/tls.md index 170e189a70c56e..075c169c93b664 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -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.