summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-09-02 15:38:59 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-09-02 15:38:59 +0700
commit832cad3b8a35616439317e334dcd617dc0a6a5b5 (patch)
tree0e6a84640bfc33ad482ad5814680fba97c6334fb
parentSpan-based variant of IBufferedCipher.ProcessByte (diff)
downloadBouncyCastle.NET-ed25519-832cad3b8a35616439317e334dcd617dc0a6a5b5.tar.xz
FIx return value for empty read
-rw-r--r--crypto/src/tls/TlsProtocol.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/tls/TlsProtocol.cs b/crypto/src/tls/TlsProtocol.cs
index dbbb6e0f5..b5a955bed 100644
--- a/crypto/src/tls/TlsProtocol.cs
+++ b/crypto/src/tls/TlsProtocol.cs
@@ -717,7 +717,7 @@ namespace Org.BouncyCastle.Tls
                     if (this.m_failedWithError)
                         throw new IOException("Cannot read application data on failed TLS connection");
 
-                    return -1;
+                    return 0;
                 }
 
                 /*