diff --git a/lib/tls.js b/lib/tls.js index 18d2f41581..eddd438d0c 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -508,6 +508,8 @@ function Server(/* [options], listener */) { pair.encrypted.pipe(socket); socket.pipe(pair.encrypted); + pair.cleartext.socket = socket; + pair.on('secure', function() { pair.cleartext.authorized = false; if (!self.requestCert) {