-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: for tls.createServer
options, providing ctx
to SNICallback
cb
call is optionary.
#34085
Comments
If you call the callback with no |
@lpinca If you are asking why is |
Yes this was my question. |
Clarify that the `ctx` argument of the `SNICallback` callback is optional. Fixes: nodejs#34085
Clarify that the `ctx` argument of the `SNICallback` callback is optional. Fixes: #34085 PR-URL: #34097 Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
Clarify that the `ctx` argument of the `SNICallback` callback is optional. Fixes: #34085 PR-URL: #34097 Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
Clarify that the `ctx` argument of the `SNICallback` callback is optional. Fixes: #34085 PR-URL: #34097 Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
📗 API Reference Docs Problem
Location
tls.createServer
->options
->SNICallback
descriptionAffected URL(s):
https://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener
Problem description
Turns out that
ctx
is not mandatory when callingcb
passed toSNICallback
, contrary to what the documentation states. It appears thatcb
falls back to the server's SecureContext if the second parameter (ctx
) is not provided.I assume this is a documentation bug since such behavior makes sense to me.
Below is a test that proves my point:
The text was updated successfully, but these errors were encountered: