| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
`TLSSocket` should not have a hard dependency on `tls.Server`, since it may be running without it in cases like `STARTTLS`. Fix: nodejs#10704
|
cc @nodejs/crypto |
Sorry, something went wrong.
|
cc @nodejs/collaborators |
Sorry, something went wrong.
|
this looks like semver-patch but just to be safe, is there any possibility that this could break anything? (I highly doubt it but given the removal of the requirement there's always a slight possibility) |
Sorry, something went wrong.
| }), | ||
|
|
||
| SNICallback: common.mustCall((hostname, callback) => { | ||
| assert.equal(hostname, 'test.test'); |
There was a problem hiding this comment.
Can you change this to assert.strictEqual().
Sorry, something went wrong.
There was a problem hiding this comment.
Fixed, and removed that console.log() below.
Sorry, something went wrong.
|
@jasnell no possibility, everything that hit that code path was broken until this patch |
Sorry, something went wrong.
| }; | ||
|
|
||
| const client = tls.connect(opts, function() { | ||
| client.end(); |
There was a problem hiding this comment.
can just use this, and delete the const client =
Sorry, something went wrong.
There was a problem hiding this comment.
Ack.
Sorry, something went wrong.
| return; | ||
| } | ||
|
|
||
| const assert = require('assert'); |
There was a problem hiding this comment.
sort requires
Sorry, something went wrong.
There was a problem hiding this comment.
Ack
Sorry, something went wrong.
| SNICallback: common.mustCall((hostname, callback) => { | ||
| assert.deepEqual(hostname, 'test.test'); | ||
|
|
||
| callback(null, null); |
There was a problem hiding this comment.
SNICallback should invoke cb(null, ctx), where ctx is a SecureContext instance.
Is (null, null) valid? Should it be valid?
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, it is valid and it should be valid.
Sorry, something went wrong.
| @@ -0,0 +1,49 @@ | |||
| 'use strict'; | |||
| const common = require('../common'); | |||
|
|
|||
There was a problem hiding this comment.
https://github.com/nodejs/node/blob/master/doc/guides/writing-tests.md#test-structure
A test should start with a comment containing a brief description of what it is designed to test.
Sorry, something went wrong.
There was a problem hiding this comment.
Ack
Sorry, something went wrong.
There was a problem hiding this comment.
One suggested tweek to in-source comment, otherwise LGTM
Sorry, something went wrong.
| if (!ctx) | ||
| ctx = self.server._sharedCreds; | ||
|
|
||
| // Running on non-TLS server |
There was a problem hiding this comment.
This comment confused me when I read it, and I only understood when reading the unit test and PR history. Can I suggest:
TLS socket is using a net.Server, instead of a tls.TLSServer, so some TLS properties will not be present.
Sorry, something went wrong.
There was a problem hiding this comment.
ping
Sorry, something went wrong.
There was a problem hiding this comment.
Agreed this comment is rather cryptic.
Sorry, something went wrong.
|
Do you have any information on when this will be merged and released? |
Sorry, something went wrong.
|
@nodejs/crypto a review from one of you is required, I believe. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM if you clarify the comment.
Sorry, something went wrong.
| if (!ctx) | ||
| ctx = self.server._sharedCreds; | ||
|
|
||
| // Running on non-TLS server |
There was a problem hiding this comment.
Agreed this comment is rather cryptic.
Sorry, something went wrong.
|
Is it possible to catch this crash as an exception? I didn't succeed so far. This would be a good workaround until this is packaged. |
Sorry, something went wrong.
|
Pushed the fix to the comment, PTAL. Landing if the wording is fine. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with a suggestion.
Sorry, something went wrong.
|
|
||
| // Running on non-TLS server | ||
| // TLS socket is using a `net.Server` instead of a tls.TLSServer. | ||
| // Some TLS properties will not be present. |
There was a problem hiding this comment.
Consider giving one or two examples of properties that won't be there.
Sorry, something went wrong.
Sorry, something went wrong.
|
hello, sorry for asking this but I'd like to know if there is any planning on merging+packaging this PR. Thanks. |
Sorry, something went wrong.
|
@webertrlz Yes, this should land assuming that CI comes back good. |
Sorry, something went wrong.
|
Won't show up packaged until the next 7.x release, which will be a couple weeks at least. |
Sorry, something went wrong.
|
The post above means that it won't go packaged for 6.XX LTS? |
Sorry, something went wrong.
|
@webertrlz The rules are that changes first have to live an a Current release for two weeks before they are applied to the LTS branches. This change will almost certainly be available in the next one or two v6.x releases, and probably v4.x as well. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
tls
TLSSocket should not have a hard dependency on tls.Server, since it
may be running without it in cases like STARTTLS.
Fix: #10704