Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 32ef1b3

Browse filesBrowse files
lpincaaddaleax
authored andcommitted
doc: clarify that the ctx argument is optional
Clarify that the `ctx` argument of the `SNICallback` callback is optional. Fixes: #34085 PR-URL: #34097 Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 8960a63 commit 32ef1b3
Copy full SHA for 32ef1b3

File tree

Expand file treeCollapse file tree

1 file changed

+9
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-6
lines changed
Open diff view settings
Collapse file

‎doc/api/tls.md‎

Copy file name to clipboardExpand all lines: doc/api/tls.md
+9-6Lines changed: 9 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1687,12 +1687,15 @@ changes:
16871687
* `sessionTimeout` {number} The number of seconds after which a TLS session
16881688
created by the server will no longer be resumable. See
16891689
[Session Resumption][] for more information. **Default:** `300`.
1690-
* `SNICallback(servername, cb)` {Function} A function that will be called if
1691-
the client supports SNI TLS extension. Two arguments will be passed when
1692-
called: `servername` and `cb`. `SNICallback` should invoke `cb(null, ctx)`,
1693-
where `ctx` is a `SecureContext` instance. (`tls.createSecureContext(...)`
1694-
can be used to get a proper `SecureContext`.) If `SNICallback` wasn't
1695-
provided the default callback with high-level API will be used (see below).
1690+
* `SNICallback(servername, callback)` {Function} A function that will be
1691+
called if the client supports SNI TLS extension. Two arguments will be
1692+
passed when called: `servername` and `callback`. `callback` is an
1693+
error-first callback that takes two optional arguments: `error` and `ctx`.
1694+
`ctx`, if provided, is a `SecureContext` instance.
1695+
[`tls.createSecureContext()`][] can be used to get a proper `SecureContext`.
1696+
If `callback` is called with a falsy `ctx` argument, the default secure
1697+
context of the server will be used. If `SNICallback` wasn't provided the
1698+
default callback with high-level API will be used (see below).
16961699
* `ticketKeys`: {Buffer} 48-bytes of cryptographically strong pseudo-random
16971700
data. See [Session Resumption][] for more information.
16981701
* `pskCallback` {Function}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.