tls_legacy: do not read on OpenSSL's stack
Do not attempt to read data from the socket whilst on OpenSSL's stack, weird things may happen, and this is most likely going to result in some kind of error. PR-URL: https://github.com/nodejs/node/pull/4624 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
6039a7c1b5
commit
5a2445b0c0
@ -614,13 +614,15 @@ function onclienthello(hello) {
|
||||
|
||||
if (err) return self.socket.destroy(err);
|
||||
|
||||
self.ssl.loadSession(session);
|
||||
self.ssl.endParser();
|
||||
setImmediate(function() {
|
||||
self.ssl.loadSession(session);
|
||||
self.ssl.endParser();
|
||||
|
||||
// Cycle data
|
||||
self._resumingSession = false;
|
||||
self.cleartext.read(0);
|
||||
self.encrypted.read(0);
|
||||
// Cycle data
|
||||
self._resumingSession = false;
|
||||
self.cleartext.read(0);
|
||||
self.encrypted.read(0);
|
||||
});
|
||||
}
|
||||
|
||||
if (hello.sessionId.length <= 0 ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user