From f93624749322b60eb96c80d466ea234a1a46d4c4 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 6 Mar 2023 19:43:25 +0700 Subject: Refactoring in Asn1 --- crypto/src/tls/TlsUtilities.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/src/tls/TlsUtilities.cs') 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; } -- cgit 1.4.1