Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
tls: TLSSocket options not initialized#2614
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
doc/api/tls.markdown Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The true here should include backticks also for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
thefourtheye commented Aug 31, 2015
If Edit: I see that the code relies only on the truthiness/falsiness of |
9fc32cd to f61c44aCompareindutny commented Sep 24, 2015
cc @nodejs/crypto |
lib/_tls_wrap.js Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that this can possibly suffice. There are also context and various other things that needs to be specified. It can't be possible to omit them, so I don't think that there is any point in providing this default values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you would like to make isServerfalse by default - let's do it explicitly!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make isServer: false by default (set to false if options is undefined or options.isServer is undefined).
Regarding the context - TLS API says the rest of the options (besides isServer) are optional and seems like _wrapHandle() creates a secureContext if such is not provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... sorry then!
f61c44a to 324bb28Comparejhamhader commented Sep 26, 2015
|
jhamhader commented Oct 8, 2015
@indutny can you confirm? |
indutny commented Oct 13, 2015
Why is it needed? Would it be enough to do |
jhamhader commented Oct 18, 2015
Well, it is not only passed to the C++ layer - it is also used extensively in _tls_wrap.js. but initializing this value with a default boolean (in either way) seems like a harmless and safe thing to do. |
indutny commented Oct 18, 2015
@jhamhader It feels like doing |
324bb28 to 7f69c59Comparejhamhader commented Oct 20, 2015
Done |
doc/api/tls.markdown Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this over 80 column limit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the thorough review. Fixed that
Upon creating a TLSSocket object, set the default isServer option to false Updated tls docs and added test-tls-socket-default-options
7f69c59 to 62354f6Compareindutny commented Oct 20, 2015
LGTM |
indutny commented Oct 20, 2015
indutny commented Oct 20, 2015
Landed in adfd20b, thank you! |
Upon creating a TLSSocket object, set the default isServer option to false Updated tls docs and added test-tls-socket-default-options PR-URL: #2614 Reviewed-By: Fedor Indutny <[email protected]>
Upon creating a TLSSocket object, set the default isServer option to false Updated tls docs and added test-tls-socket-default-options PR-URL: #2614 Reviewed-By: Fedor Indutny <[email protected]>
MylesBorins commented Oct 23, 2015
LTS? |
MylesBorins commented Oct 23, 2015
/cc @jasnell |
Upon creating a TLSSocket object, set the default isServer option to false Updated tls docs and added test-tls-socket-default-options PR-URL: nodejs#2614 Reviewed-By: Fedor Indutny <[email protected]>
jasnell commented Oct 26, 2015
Landed in v4.x-staging in 590378c |
Upon creating a TLSSocket object, set the default isServer option to false Updated tls docs and added test-tls-socket-default-options PR-URL: #2614 Reviewed-By: Fedor Indutny <[email protected]>
Upon creating a TLSSocket object, set the default isServer option to false Updated tls docs and added test-tls-socket-default-options PR-URL: #2614 Reviewed-By: Fedor Indutny <[email protected]>
Upon creating a TLSSocket object without options, default options will be used, which
set the socket as isServer: false
Updated tls docs and added test-tls-socket-default-options
See issue #2394