diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2019-03-05 15:00:09 +0100 |
---|---|---|
committer | Beth Griggs <Bethany.Griggs@uk.ibm.com> | 2019-03-20 23:53:31 +0000 |
commit | 91620b8bd61bc7932198c2309b8f3158d04ae4ca (patch) | |
tree | 6a20c8231efd9b44ee3e18e02b5c8a33e8711ea7 /lib | |
parent | c07ba9681fd16c5aaa8dce66478efa6a80372d2a (diff) | |
download | node-new-91620b8bd61bc7932198c2309b8f3158d04ae4ca.tar.gz |
tls: fix legacy SecurePair session resumption
This seems to have been broken ever since its introduction 5 years ago
in commit 75ea11fc08 ("tls: introduce asynchronous `newSession`") and
no one complained but that's not going to stop me from fixing it anyway
because otherwise I can't write a regression test for issue #26428.
Refs: https://github.com/nodejs/node/issues/26428
PR-URL: https://github.com/nodejs/node/pull/26452
Fixes: https://github.com/nodejs/node/issues/26428
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/_tls_legacy.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index fc2fb6db5d..52de70d479 100644 --- a/lib/_tls_legacy.js +++ b/lib/_tls_legacy.js @@ -691,8 +691,9 @@ function onnewsession(key, session) { return; once = true; - if (self.ssl) - self.ssl.newSessionDone(); + // Cycle data + self.cleartext.read(0); + self.encrypted.read(0); } } |