summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2019-05-10 17:02:20 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2019-05-10 17:02:20 +0700
commit3b037d5eba10e69834125d03f7204084d3a29092 (patch)
treedeb58a5b5f7b605aeedbb31a53f68503535c8cb7
parentUpdate KDF test project files and .NET 1.1 compat. (diff)
parentUpdate TlsProtocol.cs (diff)
downloadBouncyCastle.NET-ed25519-3b037d5eba10e69834125d03f7204084d3a29092.tar.xz
Merge branch 'patch-1' of https://github.com/deniszykov/bc-csharp into deniszykov-patch-1
-rw-r--r--crypto/src/crypto/tls/TlsProtocol.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/src/crypto/tls/TlsProtocol.cs b/crypto/src/crypto/tls/TlsProtocol.cs
index 394967c37..103f6af0f 100644
--- a/crypto/src/crypto/tls/TlsProtocol.cs
+++ b/crypto/src/crypto/tls/TlsProtocol.cs
@@ -748,12 +748,17 @@ namespace Org.BouncyCastle.Crypto.Tls
          */
         public virtual void OfferInput(byte[] input)
         {
+            this.OfferInput(input, 0, input.Length);
+        }
+        
+        public virtual void OfferInput(byte[] input, int offset, int length)
+        {
             if (mBlocking)
                 throw new InvalidOperationException("Cannot use OfferInput() in blocking mode! Use Stream instead.");
             if (mClosed)
                 throw new IOException("Connection is closed, cannot accept any more input");
 
-            mInputBuffers.Write(input);
+            mInputBuffers.Write(input, offset, length);
 
             // loop while there are enough bytes to read the length of the next record
             while (mInputBuffers.Available >= RecordStream.TLS_HEADER_SIZE)