Skip to content
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

tls: renegotiate should take care of its own state #25997

Conversation

@sam-github
Copy link
Member

commented Feb 7, 2019

In the initial version of this test there were two zero-length writes to
force tls state to cycle. The second is not necessary, at least not now,
but the first was. The renegotiate() API should ensure that packet
exchange takes place, not its users, so move the zero-length write into
tls.

See: #14239
See: b1909d3

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
tls: renegotiate should take care of its own state
In the initial version of this test there were two zero-length writes to
force tls state to cycle. The second is not necessary, at least not now,
but the first was. The renegotiate() API should ensure that packet
exchange takes place, not its users, so move the zero-length write into
tls.

See: #14239
See: b1909d3
@sam-github

This comment has been minimized.

Copy link
Member Author

commented Feb 7, 2019

I don't offer any justifiation for this change, its streams black magic. I'm curious to see if it passes CI.

@sam-github

This comment has been minimized.

Copy link
Member Author

commented Feb 9, 2019

@sam-github

This comment has been minimized.

Copy link
Member Author

commented Feb 9, 2019

Any thoughts on this? @jasnell @cjihrig @addaleax @mcollina

@addaleax
Copy link
Member

left a comment

Thanks for the ping :)

Btw, in the long run, it might make sense to move TLSWrap to a HTTP2-style model, where we check at the end of methods whether we have data to send or not, and if so, schedule a write.

@jasnell
jasnell approved these changes Feb 9, 2019
@cjihrig
cjihrig approved these changes Feb 9, 2019
Copy link
Contributor

left a comment

Cautious LGTM

@danbev

This comment has been minimized.

Copy link
Member

commented Feb 13, 2019

Landed in 666beb0.

@danbev danbev closed this Feb 13, 2019

danbev added a commit that referenced this pull request Feb 13, 2019
tls: renegotiate should take care of its own state
In the initial version of this test there were two zero-length writes to
force tls state to cycle. The second is not necessary, at least not now,
but the first was. The renegotiate() API should ensure that packet
exchange takes place, not its users, so move the zero-length write into
tls.

See: #14239
See: b1909d3

PR-URL: #25997
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
addaleax added a commit that referenced this pull request Feb 13, 2019
tls: renegotiate should take care of its own state
In the initial version of this test there were two zero-length writes to
force tls state to cycle. The second is not necessary, at least not now,
but the first was. The renegotiate() API should ensure that packet
exchange takes place, not its users, so move the zero-length write into
tls.

See: #14239
See: b1909d3

PR-URL: #25997
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@targos targos referenced this pull request Feb 14, 2019

@sam-github sam-github deleted the sam-github:remove-suspicious-zero-length-write branch Mar 4, 2019

MylesBorins added a commit to MylesBorins/node that referenced this pull request May 28, 2019
tls: renegotiate should take care of its own state
In the initial version of this test there were two zero-length writes to
force tls state to cycle. The second is not necessary, at least not now,
but the first was. The renegotiate() API should ensure that packet
exchange takes place, not its users, so move the zero-length write into
tls.

See: nodejs#14239
See: nodejs@b1909d3

PR-URL: nodejs#25997
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
BethGriggs added a commit that referenced this pull request Jun 7, 2019
tls: renegotiate should take care of its own state
In the initial version of this test there were two zero-length writes to
force tls state to cycle. The second is not necessary, at least not now,
but the first was. The renegotiate() API should ensure that packet
exchange takes place, not its users, so move the zero-length write into
tls.

See: #14239
See: b1909d3

Backport-PR-URL: #27938
PR-URL: #25997
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@BethGriggs BethGriggs referenced this pull request Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.