summary refs log tree commit diff
path: root/crypto/src/tls
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/tls')
-rw-r--r--crypto/src/tls/TlsUtilities.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/tls/TlsUtilities.cs b/crypto/src/tls/TlsUtilities.cs
index d187aeed2..0d2a971a0 100644
--- a/crypto/src/tls/TlsUtilities.cs
+++ b/crypto/src/tls/TlsUtilities.cs
@@ -971,7 +971,7 @@ namespace Org.BouncyCastle.Tls
                 Asn1Object result = asn1In.ReadObject();
                 if (null == result)
                     throw new TlsFatalAlert(AlertDescription.decode_error);
-                if (asn1In.Length != asn1In.Position)
+                if (encoding.Length != asn1In.Position)
                     throw new TlsFatalAlert(AlertDescription.decode_error);
                 return result;
             }