diff --git a/lib/tls.js b/lib/tls.js index b6afa3c59ac..3613b8bb831 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -290,6 +290,11 @@ function CleartextStream(pair) { util.inherits(CleartextStream, CryptoStream); +CleartextStream.prototype._pendingBytes = function() { + return this.pair._ssl._clearPending(); +}; + + CleartextStream.prototype._sucker = function(b) { debug('writng from clearIn'); return this.pair._ssl.clearIn(b, 0, b.length); @@ -309,6 +314,11 @@ function EncryptedStream(pair) { util.inherits(EncryptedStream, CryptoStream); +EncryptedStream.prototype._pendingBytes = function() { + return this.pair._ssl._endPending(); +}; + + EncryptedStream.prototype._sucker = function(b) { debug('writing from encIn'); return this.pair._ssl.encIn(b, 0, b.length);